

0 / 2 embers
0 / 3000 xp
click for more info
Complete a lesson to start your streak
click for more info
Still calibrating
click for more info
Not enough gems
Cost: 6 gems
1: Rebase Conflicts
incomplete
2: Make the Conflict
incomplete
3: Resolve the Conflict
incomplete
4: Deleted Commit
incomplete
5: Cleanup
incomplete
6: Repeat Resolution Setup
incomplete
7: RERERE
incomplete
8: Merge Back In
incomplete
9: Accidental Commit
incomplete
Back
ctrl+,
Next
ctrl+.
This lesson's interactive features are locked, please to keep using them
Let's see some conflicts!
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.
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