If the index is already in a conflict state, simply check out the file with the --conflict=merge
flag:
git checkout --conflict=merge file
If the index is clean because the unresolved file has been [erroneously] added, just reset it before checking it out:
git reset file
git checkout --conflict=merge file
This will allow you to resume conflict resolution normally (e.g., git mergetool
).
NOTE: Promoting a comment to @jakub-nar?bski's answer into its own answer by request from @fourpastmidnight. :)
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…