We're sorry but this app doesn't work properly without JavaScript enabled. Please enable it to continue.

This lesson's interactive features are locked, please to keep using them

RERERE

Let's see some conflicts!

Assignment

git config set --local rerere.enabled true
wagslane@MacBook-Pro-2 megacorp % git rebase main
Auto-merging customers/favs.md
CONFLICT (add/add): Merge conflict in customers/favs.md
error: could not apply ad9b194... K
hint: Resolve all conflicts manually, mark them as resolved with
hint: "git add/rm <conflicted_files>", then run "git rebase --continue".
hint: You can instead skip this commit: run "git rebase --skip".
hint: To abort and get back to the state before "git rebase", run "git rebase --abort".
Recorded preimage for 'customers/favs.md' # <--- THIS LINE HERE
Could not apply ad9b194... K

Notice how it's recording what we're doing as we resolve the conflict? This is the rerere feature in action!

# Favorite Customers
* Jesse Pinkman, Heisenberg's Assistant
* Walter White, Heisenberg, Chemist
wagslane@MacBook-Pro-2 megacorp % git add .
wagslane@MacBook-Pro-2 megacorp % git rebase --continue
Recorded resolution for 'customers/favs.md'. # <--- THIS LINE HERE
[detached HEAD cbf38e9] J
 1 file changed, 1 insertion(+)
Successfully rebased and updated refs/heads/favs.

Notice that Git is remembering how we resolved the conflict!

wagslane@MacBook-Pro-2 megacorp % git rebase main
Auto-merging customers/favs.md
CONFLICT (add/add): Merge conflict in customers/favs.md
error: could not apply ad9b194... K
hint: Resolve all conflicts manually, mark them as resolved with
hint: "git add/rm <conflicted_files>", then run "git rebase --continue".
hint: You can instead skip this commit: run "git rebase --skip".
hint: To abort and get back to the state before "git rebase", run "git rebase --abort".
Resolved 'customers/favs.md' using previous resolution. # <--- THIS LINE HERE
Could not apply ad9b194... K

Run and submit the CLI tests.

Tips

If you mess up and need to repeat parts of this step, you can clear the rerere cache with this command from the root of your repo:

rm -rf .git/rr-cache