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?
PS. I am still learning English, however sometimes I am making stupid mistakes. I am doing my best, writing questions and answers in English, however I would be very glad if you will edit my post in case of any mistakes. I promise, your effort will not be wasted.
We can manually resolve the merge conflict by editing the content in the bottom pane, and then saving the file using :wqa (Write and Quit all files). Once the conflict resolution is successful, the merged file will be staged for commit. git commit -m 'Merged from multiple branches' .
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.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With