Git has a feature called rerere. What is its main purpose?
Think about how Git can help you avoid resolving the same conflict multiple times.
The rerere feature stands for 'reuse recorded resolution'. It helps by remembering how you fixed a conflict once and applying the same fix automatically if the same conflict appears again.
You run these commands in a Git repository:
git config --global rerere.enabled true git merge feature-branch
The merge causes conflicts. After you fix the conflicts and run git add and git commit, what will happen if you later merge the same conflicting changes again?
Think about what enabling rerere does after you resolve conflicts once.
With rerere enabled, Git records how you resolved conflicts. When the same conflict happens again, Git applies the recorded resolution automatically.
You have rerere enabled, but Git does not reuse your previous conflict resolutions during a merge. What could be a reason?
Consider how rerere matches conflicts to recorded resolutions.
Rerere matches conflicts by their exact content. If the conflict changes even a little, rerere cannot recognize it and won't reuse the resolution.
You want to use rerere to help resolve repeated conflicts during a git rebase. Which sequence of commands correctly uses rerere?
Think about when to enable rerere and how to continue a rebase after conflicts.
You must enable rerere before starting the rebase. After resolving conflicts, stage the files with git add and then run git rebase --continue to proceed.
Your team uses rerere to handle repeated conflicts. What is the best practice regarding the rerere data directory (.git/rr-cache)?
Consider how rerere data is stored and shared among team members.
The rerere cache is local to each repository and should not be committed or shared. Each developer manages their own conflict resolutions independently.