# git rerere forget isn't working?

3 messages from 2015-01-12 to 2015-01-13. Participants: Robert Dailey, Junio C Hamano.
Thread: https://gitlist.dev/t/38337

## Robert Dailey, 2015-01-12 14:20

Subject: git rerere forget isn't working?
Message-ID: <CAHd499C6opP_0RBGDS=h+1qhrr=7sD0w0hf_bpGWT-wPP4iJoQ@mail.gmail.com>
URL: https://gitlist.dev/e/CAHd499C6opP_0RBGDS%3Dh%2B1qhrr%3D7sD0w0hf_bpGWT-wPP4iJoQ%40mail.gmail.com

```
So I want a way to clear out the whole rerere cache (i.e. every
remembered conflict resolution). So I try this command:

$ git rerere forget .

It completes silently, I look at .git/rr-cache and there are still a
bunch of SHA1 directories in there. So I guess it didn't work. The
only way I can do this is to physically delete the .git/rr-cache
directory. I'd rather not do this, so is there a way to get this
command to work properly? I'm using git 2.1.0 on Windows.

```

## Junio C Hamano, 2015-01-12 18:24

Subject: Re: git rerere forget isn't working?
Message-ID: <xmqq7fwrambo.fsf@gitster.dls.corp.google.com>
URL: https://gitlist.dev/e/xmqq7fwrambo.fsf%40gitster.dls.corp.google.com
In-Reply-To: <CAHd499C6opP_0RBGDS=h+1qhrr=7sD0w0hf_bpGWT-wPP4iJoQ@mail.gmail.com>

```
Robert Dailey <rcdailey.lists@gmail.com> writes:

> So I want a way to clear out the whole rerere cache (i.e. every
> remembered conflict resolution). So I try this command:
>
> $ git rerere forget .

The forget subcommand is to tell Git that you screwed up in this
sequence:

    $ git merge other ;# or any "mergy" operation that leaves conflict
    $ edit foo ;# help Git resolve conflicts
    $ git rerere foo ;# and tell it to remember
    ... and then later find that your earlier resolution was wrong
    $ git rerere forget foo

The "dot" there may mean "all paths", but it is still "all paths I
resolved for this particular set of conflicts the "mergy" operation
produced.  There is no "I do not care if there are good resolutions
remembered that do not have anything to do with the current merge,
just remove all of them"---that is what "rm -fr .git/rr-cache" is
for.

```

## Robert Dailey, 2015-01-13 13:39

Subject: Re: git rerere forget isn't working?
Message-ID: <CAHd499AS4q4wvSDAnaiZ9qo2C7Br3rmnrTBtDv-YgQn_=zJPnA@mail.gmail.com>
URL: https://gitlist.dev/e/CAHd499AS4q4wvSDAnaiZ9qo2C7Br3rmnrTBtDv-YgQn_%3DzJPnA%40mail.gmail.com
In-Reply-To: <xmqq7fwrambo.fsf@gitster.dls.corp.google.com>

```
On Mon, Jan 12, 2015 at 12:24 PM, Junio C Hamano <gitster@pobox.com> wrote:
> Robert Dailey <rcdailey.lists@gmail.com> writes:
>
>> So I want a way to clear out the whole rerere cache (i.e. every
>> remembered conflict resolution). So I try this command:
>>
>> $ git rerere forget .
>
> The forget subcommand is to tell Git that you screwed up in this
> sequence:
>
>     $ git merge other ;# or any "mergy" operation that leaves conflict
>     $ edit foo ;# help Git resolve conflicts
>     $ git rerere foo ;# and tell it to remember
>     ... and then later find that your earlier resolution was wrong
>     $ git rerere forget foo
>
> The "dot" there may mean "all paths", but it is still "all paths I
> resolved for this particular set of conflicts the "mergy" operation
> produced.  There is no "I do not care if there are good resolutions
> remembered that do not have anything to do with the current merge,
> just remove all of them"---that is what "rm -fr .git/rr-cache" is
> for.

So to be clear, `rerere forget` is for use prior to `merge --abort`
then? I have the global config option set to make rebase and merge
automatically record to rr cache (forgetting the name ATM but you
should know what I'm talking about). I didn't see it documented that
it's safe/recommended to manually delete rr-cache directory, so I
wasn't sure if that was a valid solution.

Thanks for the information it has been helpful.

```
