

0 / 2 embers
0 / 3000 xp
click for more info
Complete a lesson to start your streak
click for more info
Difficulty: 4
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
What happened??? Why is our I: commit just gone!?!
Well, let's think about what happened during our rebase conflict resolution:
We started a rebase of banned onto main, meaning we're rewriting the
history of banned to include all the changes from main.
We effectively removed all the changes from the I commit by choosing to keep the changes from main instead of banned.
We continued the rebase, and Git realized that the I commit was pointless, and because we're rewriting history anyway, it just removed it.
If our changes had been more complicated, say we had kept some of the changes from the I commit, and overwritten others, then Git would have kept the I commit in the history.