I use stashes via the autostash feature. For unspeakable reasons, I have to have locally modified files in my repo to run the software and the tests. (Of course, it shouldn't be like this.)
So I can `git pull --rebase --autostash` and this works even with local modifications.
TIL, thanks! I've been stash; rebase; pop'ing
I have a vague recollection of feature parity with Mercurial's shelves but I don't remember which came first. They look very similar: https://www.mercurial-scm.org/wiki/ShelveExtension
Perhaps a Mercurial user can say if shelves are more useful? (And if so, why?).
Re:This is how I git
by steerablesafe on Tuesday November 10, 2020 @06:00AM
(#25044601)
I'm a Mercurial user and I use bookmarks instead, aka git-like branches.
Like the article writer, I never myself use stash. I personally don't understand why they were added to the git ux. I think they needlessly make git more complex. Under the hood, a stash is just a commit anyway. You might retort that this is an implementation detail but as usual with Git, this leaks into the way it is used: if you ever lose a stash by mistake, you will have to go fish the corresponding commit in the reflog.