# Teaching rerere about existing merges

4 messages from 2013-04-09 to 2013-04-09. Participants: Jeremy Rosen, Jed Brown, Junio C Hamano.
Thread: https://gitlist.dev/t/33447

## Jeremy Rosen, 2013-04-09 14:18

Subject: Teaching rerere about existing merges
Message-ID: <504282025.1400346.1365517106800.JavaMail.root@openwide.fr>
URL: https://gitlist.dev/e/504282025.1400346.1365517106800.JavaMail.root%40openwide.fr

```
Hello everybody

I have just discovered rerere which seems to be an awesome feature....

unfortunately I have been merging and resolving conflicts on my repository
for quite some time and I will soon do a rebase that would greatly
gain from using rerere...

is there a way to "teach" rerere about existing merge commits, or do I 
have to re-solve all the existing merge manually once ?

    Regards

    Jérémy Rosen

fight key loggers : write some perl using vim

```

## Jed Brown, 2013-04-09 15:08

Subject: Re: Teaching rerere about existing merges
Message-ID: <87k3ob7ndj.fsf@mcs.anl.gov>
URL: https://gitlist.dev/e/87k3ob7ndj.fsf%40mcs.anl.gov
In-Reply-To: <504282025.1400346.1365517106800.JavaMail.root@openwide.fr>

```
Jeremy Rosen <jeremy.rosen@openwide.fr> writes:

> is there a way to "teach" rerere about existing merge commits, or do I 
> have to re-solve all the existing merge manually once ?

See src/contrib/rerere-train.sh and Junio's blog.

http://git-blame.blogspot.com/2012/04/rebuilding-git-integration-environment.html

```

## Jeremy Rosen, 2013-04-09 15:20

Subject: Re: Teaching rerere about existing merges
Message-ID: <1905484131.1403079.1365520801804.JavaMail.root@openwide.fr>
URL: https://gitlist.dev/e/1905484131.1403079.1365520801804.JavaMail.root%40openwide.fr
In-Reply-To: <87k3ob7ndj.fsf@mcs.anl.gov>

```
thanks a lot, that solves my problem.

I'm a bit suprised that it's not part of the git-rerere command but that's good enough for me...

    Cordialement

    Jérémy Rosen

fight key loggers : write some perl using vim

----- Mail original -----
> Jeremy Rosen <jeremy.rosen@openwide.fr> writes:
> 
> > is there a way to "teach" rerere about existing merge commits, or
> > do I
> > have to re-solve all the existing merge manually once ?
> 
> See src/contrib/rerere-train.sh and Junio's blog.
> 
> http://git-blame.blogspot.com/2012/04/rebuilding-git-integration-environment.html
> 

```

## Junio C Hamano, 2013-04-09 16:01

Subject: Re: Teaching rerere about existing merges
Message-ID: <7vd2u3u20c.fsf@alter.siamese.dyndns.org>
URL: https://gitlist.dev/e/7vd2u3u20c.fsf%40alter.siamese.dyndns.org
In-Reply-To: <504282025.1400346.1365517106800.JavaMail.root@openwide.fr>

```
Jeremy Rosen <jeremy.rosen@openwide.fr> writes:

> is there a way to "teach" rerere about existing merge commits, or do I 
> have to re-solve all the existing merge manually once ?

There is a tool that does the "re-solve manually" for you.

$ git ls-files | grep rerere-train
contrib/rerere-train.sh

It uses your working tree to do its work, so you should first commit
or stash whatever you are in the middle of doing before using it.

```
