I think you could use git rerere
to record your conflict solutions, hand them over to your co-worker, who can apply them and then solve the remaining conflicts.
To enable git rerere
you first need to do git config rerere.enabled true
. From then on, all your conflict solutions are recorded by git and applied if the same conflict occurs again. You can read more about that functionality here.
After enabling rerere you can start doing the merge and solve the conflicts you are capable of. When you are done call git rerere
which will give you some output like this:
Recorded resolution for 'your-conflict.txt'.
Recorded preimage for 'co-worker-conflict.txt'
Where your-conflict.txt is the file in which you have solved the conflicts, while co-worker-conflict.txt is a file your co-worker needs to solve.
The conflict solutions are stored in the folder .git/rr-cache/. You can send the contents of this folder to your co-worker and he puts them in the same folder.
When he afterwards starts the same merge you did before, he will get output like this:
Resolved 'your-conflict.txt' using previous resolution.
Recorded preimage for 'co-worker-conflict.txt'
Meaning that your solutions to file your-conflict.txt have been applied and the solutions to file co-worker-conflict.txt are still missing. File your-conflict.txt will be in "unmerged" state, however all conflicts are solved and it can just be git add
ed.
As I'm not 100% sure about the internals of the rr-cache folder, I would empty it before recording the solutions and also before applying your files to your co-workers repository. If you want to do this often, it might be an idea to share the rr-cache folder somehow, e.g. like explained in this answer.