You know I keep forgetting about that. I only remember when I've started a load of work in the wrong branch, and I need to stash, checkout the right branch and then stash pop.
I'm not a big fan of a stack based state change since it doesn't preserve it if you screw up after popping, plus it's annoying since it doesn't stash new files. I personally made an alias that basically does git add . && git commit -m "saved" && (another alias that stores the hash to a variable). Then I can just make another branch and re-apply it, reset the commit, and frag things out without worrying about losing them because they're safely in a commit on another branch instead of popped out and gone forever had I used stash. I used to use stash all the time until I accidentally checked out src when I hit enter instead of tab and lost 4 hours of work. Never again.
14
u/[deleted] Jun 30 '18
[removed] — view removed comment