I tried doing
git diff 13.1_dev sale_edit > patch.diff
Then I tried doing git apply patch.diff
in another branch, but I got pa
You can apply the patch as a 3-way merge:
git diff 13.1_dev sale_edit > patch.diff
git apply -3 patch.diff
It should bring up the conflict so that you can resolve manually. Or you could go with a one-liner, piping the patch to git-apply directly:
git diff 13.1_dev sale_edit | git apply -3
To reverse the patch:
git diff 13.1_dev sale_edit | git apply -3 -R
(note: this is same as the commands above, without the two-stage process of creating the patch file)
git help apply
-3, --3way
When the patch does not apply cleanly, fall back on 3-way merge if
the patch records the identity of blobs it is supposed to apply to,
and we have those blobs available locally, possibly leaving
the conflict markers in the files in the working tree for the user
to resolve...