1

So once I notice that I have conflicts when pulling, I'll run git mergetool which I have setup to run with Meld.

However, once you hit save, does git automatically consider those conflicts resolved so you then just have to commit and push again?

I'm quite confused on git considers resolved. Sorry if this a dumb question. Still new to git from the terminal.

2
  • Possible duplicate of How to resolve merge conflicts in Git? Commented Jan 14, 2017 at 22:25
  • I understand how you resolve the conflicts in the tool itself, I'm just confused as to what happens after saving. I assume that the saved copy becomes the 'resolved' file? Commented Jan 14, 2017 at 22:26

2 Answers 2

0

Yes, once you exit the mergetool, the saved file will be added to the index and counts as "resolved". You can then simply commit.

To be sure what will be included in the commit, run git diff --cached.

Sign up to request clarification or add additional context in comments.

Comments

0

Git considers a merge as resolved as soon as you add the file to the staging area using git add ..

Git is not changing its internal state on a simple edit.

1 Comment

In general this is correct, however, editing the file using git mergetool will add it to the index.