3 ms·
It's worth noting that "git stash -p" (aka "git stash --patch") already exists and allows you to commit individual files or hunks within a file. Though the cost
by eslaught 9y ago
It's worth noting that "git stash -p" (aka "git stash --patch") already exists and allows you to commit individual files or hunks within a file. Though the cost is going through an interactive interface, so some users might prefer the new "git stash push". Still, if you can't upgrade, use "git stash -p".
- colept 9y agoPatch and interactive modes are the best thing next to sliced bread. I'll start with a feature and end up refactoring something and it's difficult to organize large sets of changes without them.
- ooqr 9y agoThey're definitely prereqs to upper-level git wizardry
- tgummerer 9y agoIf you can upgrade you can use "git stash -p" with pathspecs as well, so you can stash some changes in a specific file without having to go through changes in other files.