views:

59

answers:

2

Hi,

Do you know any tool/switch for git commands which help me prevent conflicts or speed up merges?

Currently I often got "trivial conflicts" such this:

++<<<<<<< HEAD
++=======
+ onClick
+ onWakeup
++>>>>>>> 587f917... 

I suppose that that is caused by some white-spaces.. this is very easy to solve by human, however it requires a lot of time to resolve all such conflicts.

Is there any tool which can solve this type of conflicts automatically?

+1  A: 

Run git-mergetool to resolve merge conflicts. See the man page here. Git has several options for merge tools. I prefer kdiff3. It's open-source, cross-platform, and easy to learn.

Git resolves as many conflicts as it can. If you get that message, it means git found a conflict that requires human intervention to resolve.

dgnorton
yes, I understand, but in my opinion it can be quite obvious, that result of this (specific types of) conflict will be removing lines "++<<<<<<< HEAD", "++=======", "++>>>>>>> 587f917... ". I am looking for tool, which will do this automatically.
noisy
A: 

If you find yourself resolving the same conflicts again, and again, then you probably want to use git rerere.

Casey