3 ms·
Is there any good way to keep track of stashes? I keep stashing stuff that I forget about and end up rewriting 2 weeks later.
by captn3m0 8y ago
Is there any good way to keep track of stashes? I keep stashing stuff that I forget about and end up rewriting 2 weeks later.
- nimrody 8y agoYes. Use a local branch. They are cheap to create. You can name the branch and, of course, write a descriptive commit message. Stashes are for quick save and restore. Branches are way more powerful.
- ramses0 8y agoHard agree here. Better to make "git my-stash working-on-foo" alias which makes a separate branch. Stashes have become an anti-pattern for me after having too many fail to reapply or drift out of date.
- ishwarn 8y agoI've made it a habit to `git stash list` and `git stash show -p stash@{2}` when I want to inspect the stashed changes.
- emmelaich 8y agoI have some aliases sl (stash list) and pop/drop for git stash pop/drop. Also make a habit of saving your stashes with a meaningful label. But yeah, like others suggest -- use branches.
- hasperdi 8y agoGit worktree changed my life. I can quickly switch branches and work on multiple branches at the same time.