It’s possible to commit files that contains conflict data. Is there a way to mark these files as conflicted again, so that running git mergetool will generate the necessary files and run the merge tool?
Share
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
You can get contents of file with conflict markers using
git checkout --conflict=merge -- file, but if you have cleaned up index by usinggit add file(or if GUI did that for you) it wouldn’t work.There is
git update-index --unresolve, but it is hacky, and does not work very reliably. I think the state it restores would be not enough for git-mergetool.You would probably have to redo merge, or use
git update-index --cacheinfoto manually set stages version… git-stash can help you preserve correctly resolved conflicts.