Reputation: 25113
Is there a way to apply patch from stash hunk by hunk like that as add hunks from working directory into stage: git add -p
?
I am looking for similar command:
git stash show -p | git apply --hunk-by-hunk
Upvotes: 9
Views: 4151
Reputation: 16121
AFAIK there is no patch mode for apply. However, you can apply the patch, then interactively remove the hunks (hunk-by-hunk) in the patch you don't like:
git checkout -p
Upvotes: 6