---
title: "TIL: git rerere Remembers Your Conflict Resolutions"
description: Turn on git rerere once and git records how you resolved a merge conflict, then replays that resolution when the same conflict comes back in a rebase or merge.
canonical: https://lukeocodes.dev/til-git-rerere
type: article
locale: en_GB
published: 2026-09-22T00:00:00.000Z
modified: 2026-09-22T00:00:00.000Z
authors:
  - Luke Oliff
section: TIL
tags:
  - TIL
  - Git
  - gitconfig
  - rebase
  - merge conflicts
  - cli
feed: https://lukeocodes.dev/rss.xml
search: https://lukeocodes.dev/search.json?q={query}
schema:
  - "@context": https://schema.org
    "@graph":
      - "@type": WebSite
        "@id": https://lukeocodes.dev/#website
        url: https://lukeocodes.dev
        name: Luke Oliff
        alternateName: lukeocodes
        inLanguage: en
        publisher:
          "@id": https://lukeocodes.dev/authors/luke#person
        description: Personal blog and writing by Luke Oliff — developer relations, voice AI, developer experience.
        potentialAction:
          - "@type": SearchAction
            target:
              "@type": EntryPoint
              urlTemplate: https://lukeocodes.dev/blog/search?q={search_term_string}
            query-input: required name=search_term_string
      - "@type": Person
        "@id": https://lukeocodes.dev/authors/luke#person
        name: Luke Oliff
        url: https://lukeocodes.dev/authors/luke
        description: Engineer and developer relations leader. Writing about developer relations, AI, and the voice industry, from the UK.
        mainEntityOfPage: https://lukeocodes.dev/authors/luke
        givenName: Luke
        familyName: Oliff
        image: https://lukeocodes.dev/authors/luke.jpg
        jobTitle: Engineer and developer relations leader
        sameAs:
          - https://www.linkedin.com/in/lukeocodes
          - https://github.com/lukeocodes
          - https://bsky.app/profile/lukeocodes.dev
          - https://x.com/lukeocodes
          - https://hashnode.com/@lukeocodes
          - https://dev.to/lukeocodes
        knowsAbout:
          - Developer Relations
          - Developer Experience
          - Voice AI
          - Text-to-Speech
          - Answer Engine Optimisation
          - Search Engine Optimisation
          - Open Source
          - Developer Tooling
          - API Design
          - Speech-to-Text
          - Voice Agents
          - Community Building
        knowsLanguage:
          - English
        nationality: British
        alumniOf:
          - "@type": Organization
            name: The Open University
  - "@context": https://schema.org
    "@graph":
      - "@type": Person
        "@id": https://lukeocodes.dev/authors/luke#person
        name: Luke Oliff
        url: https://lukeocodes.dev/authors/luke
        description: Engineer and developer relations leader. Writing about developer relations, AI, and the voice industry, from the UK.
        mainEntityOfPage: https://lukeocodes.dev/authors/luke
        givenName: Luke
        familyName: Oliff
        image: https://lukeocodes.dev/authors/luke.jpg
        jobTitle: Engineer and developer relations leader
        sameAs:
          - https://www.linkedin.com/in/lukeocodes
          - https://github.com/lukeocodes
          - https://bsky.app/profile/lukeocodes.dev
          - https://x.com/lukeocodes
          - https://hashnode.com/@lukeocodes
          - https://dev.to/lukeocodes
        knowsAbout:
          - Developer Relations
          - Developer Experience
          - Voice AI
          - Text-to-Speech
          - Answer Engine Optimisation
          - Search Engine Optimisation
          - Open Source
          - Developer Tooling
          - API Design
          - Speech-to-Text
          - Voice Agents
          - Community Building
        knowsLanguage:
          - English
        nationality: British
        alumniOf:
          - "@type": Organization
            name: The Open University
      - "@type": BlogPosting
        "@id": https://lukeocodes.dev/til-git-rerere#article
        headline: "TIL: git rerere Remembers Your Conflict Resolutions"
        alternativeHeadline: "TIL: git rerere Remembers Your Conflict Resolutions"
        description: Turn on git rerere once and git records how you resolved a merge conflict, then replays that resolution when the same conflict comes back in a rebase or merge.
        datePublished: 2026-09-22T00:00:00.000Z
        dateModified: 2026-09-22T00:00:00.000Z
        url: https://lukeocodes.dev/til-git-rerere
        mainEntityOfPage: https://lukeocodes.dev/til-git-rerere
        inLanguage: en
        author:
          - "@id": https://lukeocodes.dev/authors/luke#person
        isPartOf:
          "@id": https://lukeocodes.dev/#website
        keywords: TIL, Git, gitconfig, rebase, merge conflicts, cli
        articleSection: TIL
        abstract: git rerere, short for reuse recorded resolution, saves how you resolved each conflict and reapplies it the next time the same hunk conflicts. Enable it with git config --global rerere.enabled true.
        speakable:
          "@type": SpeakableSpecification
          cssSelector:
            - .post-tldr
            - h1
        image: https://lukeocodes.dev/og.png?h=TIL%3A+git+rerere+Remembers+Your+Conflict+Resolutions&d=Turn+on+git+rerere+once+and+git+records+how+you+resolved+a+merge+conflict%2C+then+replays+that+resolution+when+the+same+conflict+comes+back+in+a+rebase+or+merge.&e=Writing
        wordCount: 220
        timeRequired: PT2M
        publisher:
          "@id": https://lukeocodes.dev/authors/luke#person
      - "@type": BreadcrumbList
        itemListElement:
          - "@type": ListItem
            position: 1
            name: Home
            item: https://lukeocodes.dev
          - "@type": ListItem
            position: 2
            name: Writing
            item: https://lukeocodes.dev/blog
          - "@type": ListItem
            position: 3
            name: "TIL: git rerere Remembers Your Conflict Resolutions"
            item: https://lukeocodes.dev/til-git-rerere
---

[Luke Oliff.](/)

- [Blog](/blog)
- [CV](/cv)
- [Uses](/uses)
- [User manual](/user-manual)
- [Living with ADHD](/living-and-working-with-adhd)
- [RSS](/rss.xml)

[Luke Oliff · Writing](/blog)

# TIL: git rerere Remembers Your Conflict Resolutions

Sep 2026 · [TIL](/blog/category/til) · 2 min read · [Luke Oliff](/authors/luke)

**TL;DR:** git rerere, short for reuse recorded resolution, saves how you resolved each conflict and reapplies it the next time the same hunk conflicts. Enable it with git config --global rerere.enabled true.

Git can remember how you fixed a merge conflict and do the same fix again next time. The setting is `git rerere`, short for reuse recorded resolution. It is off by default.

```bash
git config --global rerere.enabled true
```

From then on, every conflict you fix and commit gets saved in `.git/rr-cache`. Git keeps the block of lines it could not merge and what you changed them to. The next time that same block conflicts, git puts your fix in and leaves the file for you to check. Set `rerere.autoUpdate` to `true` and it adds the fixed file to the commit for you as well.

This is most useful when you give up on a rebase halfway through. Start it again and the conflicts you already fixed get fixed for you. Same when you copy one fix onto three release branches with `git cherry-pick`.

[The git config defaults post](https://lukeocodes.dev/git-config-defaults) left this one out.

### What if I recorded a bad resolution?

`git rerere forget <path>` deletes the saved fix for that file. `git rerere diff` shows you what it is about to change before you trust it.

### Does it work across repos?

No. The saved fixes live in each repo's own `.git` folder. Old ones get cleared out by `git rerere gc`, and `git gc` runs that for you.

[← Newer: Moving Off WordPress: 500 Posts and a Nuxt Rebuild](/moving-off-wordpress)

[All posts](/blog) →

## Search this site

`GET https://lukeocodes.dev/search.json?q=<words>` returns matching posts as JSON, each with its page URL and its markdown URL. Add `&limit=<1-50>` for more than 10. How it works: [/blog/search](https://lukeocodes.dev/blog/search.md).

```sh
curl "https://lukeocodes.dev/search.json?q=developer+relations"
```

---

© 2026 Luke Oliff. Posts live at the root of this site.

- [GitHub](https://github.com/lukeocodes)
- [LinkedIn](https://www.linkedin.com/in/lukeocodes)
- [X](https://x.com/lukeocodes)
- [Bluesky](https://bsky.app/profile/lukeocodes.dev)
- [Email](mailto:luke@lukeoliff.com)
- [RSS](/rss.xml)

## Cookies

This site sets one analytics cookie, from Google Analytics, and only in a browser that accepts the cookie banner. A client that does not run scripts sets no cookies, so there is nothing to accept or decline here.

[Cookie policy](/cookies)
