If you write a file to the index in conflict with the conflict, how will you return to the conflict state?

Let's say I have a merge in git, which leads to a conflict in the file foo.txt. Let's say I'm trying to resolve this conflict with attempts by foo.txtmyself git add. Then I understand that I want to cancel this attempt. How do I get back as if I had never touched a file in a conflicting state?

In other words, how do I get reset to a conflicting state?

+4
source share
1 answer
git checkout -m foo.txt  # get the file back to its conflicted state
+5
source

All Articles