Git: speed up your merging process with mergetool

| 2 Comments

4.00 avg. rating (81% score) - 1 vote

Git logo

Merging from one branch to another branch is something common with Git. I had to do it several times and recently I had to make a big one. I’ve just never took the time to look at what exist to make faster merge and how to use it.

After some researches, I found git mergetool which will use VIM (by default on my laptop) to have a better view on what I have to do, to merge my files. And it looks like this:

three-way-merge-with-vimdiff

The usage of this kind of tool may be confused at the beginning, but if you take some minutes to learn how it works, you’ll win a lot of time. Here is a well written tutorial on how to use it. I strongly recommend it.
Note that you can also specify other kind of editor if you’re not comfortable with VIM which will display others kinds of view the changes. You can find more information here.

Author: Deimos

I'm a passionate DevOps. I love transmit my skills and I love working on high availability infrastructures/technologies.

2 Comments

  1. Use Fugitive instead of Vim default three way diff mode. It’s the only plugin i still use in my Vim config nowadays, for when Magit + ediff doesn’t quite cut it ;]

    See this vimcast for a great demo : http://vimcasts.org/episodes/fugitive-vim-resolving-merge-conflicts-with-vimdiff/

  2. Thanks I’m currently watching the video, it looks like interesting thanks 🙂

Laisser une réponse