Ask HN: Poll: Do you git stash your WIP?
You're working on a feature, and suddenly realize the need to switch gears to work on something else — say a prod hotfix — and you need to store your WIP somewhere, but you're not ready to commit. You run `git stash` with an optional commit message and get back to business.
What happens for me is I end up making many small stashes across many projects. It might be a trivial change or a prototype of an idea, sometimes I forget creating them in the first place and implement the same thing again and/or they become stale.
My question for others is:
Do you use git stash? Do you forget them sometimes some?
For some more context: I'm pondering writing a little program to peruse all stashes from all repos on your drive in one place.
[0]: https://git-scm.com/docs/git-stash
6 comments
[ 6.3 ms ] story [ 22.1 ms ] threadI am personally a fan of commit squashing, particularly small feature branches and/or when the commits in question are temporary like this. I try to leave a really clean commit log on each branch I work on knowing that it will be merged eventually. Sometimes I'll interactive rebase or rewrite history on these to make it that way.
Not everyone believes in that approach though.