I'm trying to merge 2 branches that have a lot of changes in them, several with merge conflicts. I merged the files using git mergetool
, but I've subsequently realized that I merged a couple of them incorrectly. I basically want to go back to the conflicted state for those couple files, so I can re-run the mergetool and correct my errors. I don't want to throw away my entire merge, since most of it is correct.
I've tried resetting to my head and then doing git checkout -m other_branch -- my_file
to no avail. I ended up resetting to HEAD, getting the file out of the other branch, and just doing git add --patch
on the file, only staging what I wanted. But there must be a better way...