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.

vercingortix
  • 135
  • 12
  • Possible duplicate of [How to resolve merge conflicts in Git?](http://stackoverflow.com/questions/161813/how-to-resolve-merge-conflicts-in-git) – Mr. Alien Jan 14 '17 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? – vercingortix Jan 14 '17 at 22:26

2 Answers2

1

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.

mkrieger1
  • 10,793
  • 4
  • 39
  • 47
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.

triplem
  • 1,200
  • 14
  • 24
  • 1
    In general this is correct, however, editing the file using `git mergetool` will add it to the index. – mkrieger1 Jan 15 '17 at 01:52