Hacker News new | ask | show | jobs
by gcp 3530 days ago
I'm not sure that combining stashes and branches wouldn't be handy for advanced users either.
2 comments

I'm not sure I'd know what name to give to my countless stashes.
Let the system provide default names for them, based on the name of the branch they came from.
Why would I commit my breaking, work in progress experiments to a branch? Isn't that what stashes are for?
New branch flagged as a "stash", named related to the branch it came from. So branch myFeature has stash myFeature-stash-1 stash branch. Hide stash branches from branch lists unless specifically requested.

Do the same with stash commits. Store them as regular commits flagged as broken and hide them when viewing history.

Hell, do the same for most history-modifying operations. The ability to flag intermediate commits as "unimportant" would let you be able to keep a clean history without rewriting it.

Maybe you want to push your work to a remote server as a way to back it up.

Maybe you want to share your work with others even though it's still in a rough state.

Maybe you have automated tests in your CI process and you want to try those tests on your side-branch.

The point is you might want to wrap workflow around your stuff, even if it's experimental and broken.

Git doesn't make these choices for you. You get to make them.

Because sometimes stashes are longer lived than we expect, and they're hard to work with if you need to do anything more complicated than popping. (Like resolving conflicts.)

I find that making a work-in-progress commit, and then resetting later ends up saving a lot of hassle overall. Having support for this beyond aliases (including putting that commit in a new branch) would be nice.

Okay, points taken. But git enables me to commit expermiments to a branch anyway if I decide to. Gitless' lack of stash would force me to commit experiments to a branch.