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

Deleted Commit

What happened??? Why is our I: commit just gone!?!

Well, let's think about what happened during our rebase conflict resolution:

  1. We started a rebase of banned onto main, meaning we're rewriting the
    history of banned to include all the changes from main.
  2. We effectively removed all the changes from the I commit by choosing to keep the changes from main instead of banned.
  3. 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.