Hacker News new | ask | show | jobs
by bumeye 4817 days ago
Simpler indeed. That's actually what stash does internally.

I usually don't make a separate branch, but just commit it in the current branch. Then you can rebase or amend later. You never need 'snapshot' if you know rebase -i.

1 comments

You can also just `git reset HEAD~1` if you want to have your index reflect the changes rather than just working on top of an empty index in a new commit. My workflow is a --no-verify commit on the branch, then when I come back, just reset to the previous commit and continue.

This is pretty much identical to stashing, though I prefer it since it means the part of git I use is smaller.