Jump into concepts and practice - no test required
or
Recommended
Test this pattern10 questions across easy, medium, and hard to know if this pattern is strong
Recall & Review
beginner
What does 'rerere' stand for in Git?
'rerere' stands for "reuse recorded resolution." It helps Git remember how you resolved conflicts before and apply the same fix automatically next time.
Click to reveal answer
beginner
How do you enable rerere in Git?
You enable rerere by running the command: git config --global rerere.enabled true. This tells Git to start remembering conflict resolutions.
Click to reveal answer
intermediate
What happens when Git rerere detects a conflict it has seen before?
Git automatically applies the previously recorded resolution to the conflict, saving you time and effort in fixing the same conflict again.
Click to reveal answer
intermediate
Where does Git store the conflict resolutions recorded by rerere?
Git stores them in the .git/rr-cache directory inside your repository.
Click to reveal answer
intermediate
Can rerere be used with merge and rebase operations?
Yes, rerere works with both merge and rebase to help automatically resolve conflicts you have fixed before.
Click to reveal answer
What is the main purpose of Git rerere?
ATo automatically commit changes
BTo remember and reuse conflict resolutions
CTo delete branches safely
DTo speed up cloning repositories
✗ Incorrect
Git rerere helps by remembering how you resolved conflicts before and reusing that resolution automatically.
How do you enable rerere in Git?
Agit config --global rerere.enabled true
Bgit rerere enable
Cgit enable rerere
Dgit rerere start
✗ Incorrect
The correct command is git config --global rerere.enabled true to enable rerere globally.
Where does Git store rerere conflict resolutions?
A.git/cache
B.git/conflicts
C.git/resolutions
D.git/rr-cache
✗ Incorrect
Git stores rerere data in the .git/rr-cache directory.
Which Git operations benefit from rerere?
AMerge and rebase
BClone and fetch
CPush and pull
DInit and status
✗ Incorrect
Rerere helps during merge and rebase operations to reuse conflict resolutions.
If rerere is enabled, what happens when you face a conflict you've resolved before?
AGit ignores the conflict
BGit deletes the conflicting files
CGit applies the previous resolution automatically
DGit asks you to resolve it again manually
✗ Incorrect
Git rerere applies the previously recorded resolution automatically to save time.
Explain how Git rerere helps with repeated conflict resolution.
Think about how you might not want to fix the same problem twice.
You got /3 concepts.
Describe the steps to enable and use rerere in your Git workflow.
Start with the configuration, then what happens during conflict.
You got /4 concepts.
Practice
(1/5)
1. What is the main purpose of git rerere in conflict resolution?
easy
A. It creates a backup of your repository before merging.
B. It remembers how you resolved conflicts before and reuses those resolutions.
C. It deletes conflicting files after a merge.
D. It automatically merges branches without any conflicts.
Solution
Step 1: Understand what rerere stands for
Rerere means "reuse recorded resolution" and helps with repeated conflicts.
Step 2: Identify its function in Git
It saves conflict resolutions and applies them automatically if the same conflict happens again.
Final Answer:
It remembers how you resolved conflicts before and reuses those resolutions. -> Option B
Quick Check:
Rerere = reuse recorded resolution [OK]
Hint: Rerere reuses your past conflict fixes automatically [OK]
Common Mistakes:
Thinking rerere merges without conflicts
Believing rerere deletes files
Assuming rerere backs up the repo
2. Which command correctly enables rerere globally in Git?
easy
A. git config --global rerere.enabled true
B. git config --global rerere.enable true
C. git rerere enable --global
D. git config rerere.enabled true --global
Solution
Step 1: Recall the correct config syntax for rerere
The correct key is "rerere.enabled" with a dot, not "rerere.enable".
Step 2: Confirm the global flag placement
The global flag comes immediately after "config" and before the key-value pair.
Final Answer:
git config --global rerere.enabled true -> Option A
Quick Check:
Correct syntax uses rerere.enabled with --global [OK]
Hint: Use 'rerere.enabled' with --global to enable rerere [OK]
Common Mistakes:
Using rerere.enable instead of rerere.enabled
Placing --global after the key-value pair
Using 'git rerere enable' command which doesn't exist
3. Given this sequence of commands, what will git status show after the second merge if rerere is enabled?
git config --global rerere.enabled true
git checkout feature
# merge master with conflicts
# resolve conflicts manually and commit
git checkout feature
# merge master again with same conflicts
medium
A. No conflicts, because rerere applied previous resolutions automatically.
B. Conflicts remain and must be resolved again manually.
C. Merge fails with an error about unresolved conflicts.
D. Git deletes the conflicting files automatically.
Solution
Step 1: Understand rerere behavior on repeated conflicts
When rerere is enabled, it remembers how you fixed conflicts and applies those fixes automatically on the same conflict.
Step 2: Analyze the second merge scenario
The second merge has the same conflicts, so rerere applies the previous resolution, avoiding manual conflict fixing.
Final Answer:
No conflicts, because rerere applied previous resolutions automatically. -> Option A
Quick Check:
Rerere auto-applies fixes on repeated conflicts [OK]
Hint: Rerere auto-fixes repeated conflicts after first manual fix [OK]
Common Mistakes:
Expecting conflicts again despite rerere
Thinking merge will fail with error
Assuming files get deleted automatically
4. You enabled rerere but notice it does not apply previous conflict resolutions automatically. What is a likely cause?
medium
A. You enabled rerere only locally, not globally.
B. You used git rerere clear before the second merge.
C. You forgot to commit the conflict resolution the first time.
D. You merged branches with no conflicts.
Solution
Step 1: Understand how rerere records resolutions
Rerere saves conflict resolutions only after you commit the resolved merge.
Step 2: Identify why rerere might not apply fixes
If you did not commit the resolution, rerere has no record to reuse, so it cannot auto-apply fixes.
Final Answer:
You forgot to commit the conflict resolution the first time. -> Option C
Quick Check:
Rerere needs committed resolutions to reuse [OK]
Hint: Commit conflict fixes first for rerere to remember them [OK]
Common Mistakes:
Assuming rerere works without committing resolutions
Confusing rerere clearing with enabling
Thinking local vs global enable affects this issue
5. You have a project where the same conflict happens often between two branches. How can you use rerere to save time and avoid repeated manual fixes? Choose the best approach.
hard
A. Run git rerere clear before every merge to reset conflict history.
B. Disable rerere and always resolve conflicts manually to avoid mistakes.
C. Use rerere only on one branch and manually copy resolutions to the other branch.
D. Enable rerere globally, resolve the conflict once and commit, then rerere will auto-apply fixes on future merges.
Solution
Step 1: Enable rerere globally for all repositories
This ensures rerere is active and can record conflict resolutions anywhere.
Step 2: Resolve the conflict once and commit the fix
Rerere records this resolution to reuse it automatically on repeated conflicts.
Step 3: Benefit from rerere auto-applying fixes on future merges
This saves time by avoiding repeated manual conflict resolution.
Final Answer:
Enable rerere globally, resolve the conflict once and commit, then rerere will auto-apply fixes on future merges. -> Option D