0

When I pull the code from remote, the git reports conflicts on one file.

UU hello.cpp

If I use git mergetool hello.cpp and fix the conflict, then git shows the following: The default mergetool is kdiff3.

M  hello.cpp

However, if I use vi to fix the conflicts, git stills show the following

UU hello.cpp

I have to use git add hello.cpp in order to show the following

M hello.cpp

What does kdiff3 do after finishing the merge so that git will show M instead of UU if I do it with vi?

Lightness Races in Orbit
  • 378,754
  • 76
  • 643
  • 1,055
q0987
  • 34,938
  • 69
  • 242
  • 387

1 Answers1

2

kdiff3 does a 'git add' when done. You can (and did) do the same thing using vi to fix the conflicts and the command line. See 'git help merge' "How to Resolve Conflicts"

Gregg
  • 2,444
  • 1
  • 12
  • 21