LinuxCommandLibrary
GitHubF-DroidGoogle Play Store

git-rerere

Reuse recorded resolution of conflicted merges

TLDR

Enable rerere
$ git config rerere.enabled true
copy
Show recorded resolutions
$ git rerere status
copy
Show diff of resolution
$ git rerere diff
copy
Clear recorded resolutions
$ git rerere clear
copy
Forget resolution
$ git rerere forget [file]
copy

SYNOPSIS

git rerere [command]

DESCRIPTION

git rerere (reuse recorded resolution) remembers how you resolved merge conflicts and automatically reapplies those resolutions in future merges. This is especially valuable during repeated merges and rebases.When enabled, Git records conflict resolutions. On subsequent merges with identical conflicts, the previous resolution is applied automatically, eliminating repetitive conflict resolution work.

PARAMETERS

status

Show paths with recorded resolutions.
diff
Show diff for current resolutions.
clear
Clear recorded resolutions.
forget PATH
Forget resolution for path.
gc
Prune old recordings.
--help
Display help information.

CONFIGURATION

rerere.enabled

Set to `true` in git config to enable automatic recording of conflict resolutions.

INSTALL

sudo apt install git
copy
sudo dnf install git
copy
sudo pacman -S git
copy
sudo apk add git
copy
sudo zypper install git
copy
brew install git
copy
nix profile install nixpkgs#git
copy

CAVEATS

Must be enabled in config. Records are local. May apply wrong resolution if contexts differ.

HISTORY

git rerere was added to Git to address the pain of resolving the same merge conflicts repeatedly, particularly during long-running branches and rebases.

SEE ALSO

RESOURCES

Braincup
Open source brain training for math, memory and focus
Braincup mini-games
41 mini-games · Apache-2.0
No ads · No tracking
Play in browser
Download Braincup on the App StoreGet Braincup on Google PlayGet Braincup on F-Droid
276 stars
From the maker of Linux Command Library
Copied to clipboard
Braincup
Open source brain training for math, memory and focus. 41 mini-games, from mental arithmetic to Sudoku, N-Back and Solo Chess.
Apache-2.0 licensed · No ads · No tracking · No account
From the maker of Linux Command Library
Download Braincup on the App StoreGet Braincup on Google PlayGet Braincup on F-Droid