sublime_merge
sublime_merge copied to clipboard
Add ability to stash individual files
Problem description
When I am working on a feature branch, sometimes I get a little carried away and begin working on something that needs to be isolated from the rest of the pack, but only realize it too late. Right now stashing just stashes the entire set of unstaged or indexed files.
Preferred solution
An ability to selectively stash hunks or whole files to be applied to another branch later.
Alternatives
Ability to break out individual files into a new branch.
... and individual lines, so that stashing works with the same amount features as staging.
and individual lines, so that stashing works with the same amount features as staging.
That is true, I have been having to add a temporary commit with the staged lines. stash all other changes, reset back one step, stash it, go to new branch, pop stash and commit, then go back to the previous branch and pop my stash back onto the branch.
Would love this as well. Ideally with a hotkey similar to shift+return that will instead of staging an active diff, would stash it. Perhaps cmd+shift+return.
Being able to stash individual files/hunks/lines would be extremely useful, especially if you could incrementally go through add to the "same" stash without needing to go through the stash options for each file/hunk/line, similar to how git stash -p works.
Today I learned that git stash -p exists.
Honorable mention: git stash push -- some_pathspec (Note: This does not work with git stash save.)
FWIW I achieve partial stashing by first staging the changes then using the Stash --staged command.