You are signed in. Close

You are signed out. Close

Thank you. Your subscription has started. Close

Thank you. You will get an email when a new comic comes out. Close

We could not confirm your payment. If you paid, use the link "Sign in" at the bottom of the page. Close

Something went wrong on our side. Please try again in a moment. Close

Previous episode git reset vs git revert: two ways to undo a commit

How Git keeps every version of your project without filling your disk

Git reflog: what happens to the commits you undo

Undo one step too many in Git, and days of commits drop out of your history. Are they gone? What the reflog keeps, and why committed work is so hard to lose.

  1. 1 On your own branch, river-work, you meant to undo only the last commit with git reset, and you went back two. Your history no longer shows "Bigger river" or "Wider river".river-workBiggerriverWiderriverno name

    On your own branch, river-work, you meant to undo only the last commit with git reset, and you went back two. Your history no longer shows "Bigger river" or "Wider river".

  2. 2 Is that work gone for good?youTwo daysof work?

    Is that work gone for good?

The rest of this episode is for subscribers

Subscribe to read every premium episode. You can cancel when you want.

Paid yearly: $99 instead of $119.88

You finished the comic Back to the comic

Share this comic

More comics