I have refactored a file by splitting into two files in one git branch, and someone else has made a different change to the original file on another git branch. This has produced a merge conflict in git when I tried to merge the second git branch into the first (which I did using magit). I have configured git to produce a 3-way diff surrounded by conflict markers in the file, and I have used C-c ^ = >
to diff the original contents of the file and the second branch changes, which produces a vc-diff
buffer.
How can I apply this vc-diff
buffer to the second file, not the first file - either one hunk at a time, or all at once? I don't mind which way it is done, but I would prefer to do it one hunk at a time. (Bearing in mind that the line numbers will probably be different, but the surrounding text will be largely the same.)