O'Reilly logo

Git: Mastering Version Control by Jakub Narębski, Rasmus Voss, Aske Olsson, Ferdinando Santacroce

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Using git rerere to merge known conflicts

While working on a feature branch, you probably like to merge daily or maybe more often, but often when you work on long-living feature branches, you end up in a situation where you have the same conflict occurring repeatedly.

Here, you can use git rerere which stands for reuse recorded resolution. Git rerere is not enabled by default but can be enabled with the following command:

$ git config rerere.enabled true

Tip

You can configure it globally by adding --global to the git config command.

How to do it…

Perform the following steps to merge the known conflicts:

  1. In the jgit repository folder, start by checking out a branch that tracks origin/stable-2.2:
    git checkout -b rerereExample --track origin/stable-2.2 ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required