How to organize fragments without interaction in git?
I know I can add chunks using any of the following commands
git add -i
git add --patch
git add --edit
But I can get all the chunks for the file
git --no-pager diff file1 > /tmp/stageme
I see three chunks, I only want the first and last chunks, so I delete the second chunk of the file /tmp/stageme
How can I execute these chunks in a command? I mean, how can I create information from /tmp/stageme
?
+3
rkmax
source
to share
1 answer
I found I can do this with the command git apply
git apply --cached /tmp/patchme
+1
rkmax
source
to share