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


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 ...

Get Git: Mastering Version Control now with O’Reilly online learning.

O’Reilly members experience live online training, plus books, videos, and digital content from 200+ publishers.