Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
732 views
in Technique[技术] by (71.8m points)

git - Restart/undo conflict resolution in a single file

In a larger git merge with several conflicting files, I incorrectly marked a file as resolved (using git add FILE after some editing)

Now I'd like to undo my conflict resolution attempt and start over resolving that file.

How can I do that?

See Question&Answers more detail:os

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Answer

0 votes
by (71.8m points)

Found the solution here: http://gitster.livejournal.com/43665.html

git checkout -m FILE

This restores the unresolved state, including all information about parent and merge base, which allows restarting the resolution.


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

2.1m questions

2.1m answers

60 comments

56.8k users

...