How to apply a patch piece using hunk?

Is there a way to apply a patch from stash hunk using hunk, like this, how to add hunks from the working directory in stage git add -p:?

I am looking for a similar command:

git stash show -p | git apply --hunk-by-hunk
+4
source share
1 answer

AFAIK no patch mode to apply. However, you can apply the patch and then interactively remove the hunk-by-hunk in a patch that you don't like:

git checkout -p

+1
source

Source: https://habr.com/ru/post/1667421/


All Articles