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 push and git pull: why Git can refuse your push

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

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

A bad commit is already pushed, and your teammates have it. Git has two ways to undo it, git reset and git revert, and on shared work one of them does real damage.

  1. 1 You look for the cause of the crash and find it: the commit "Splash sound". It sits just behind the newest commit, and it is already on origin and on Rono's laptop.Splashsoundmain

    You look for the cause of the crash and find it: the commit "Splash sound". It sits just behind the newest commit, and it is already on origin and on Rono's laptop.

  2. 2 Git has two commands to undo a commit, git reset and git revert, and only one of them is safe here. Which one, and why?git resetgit revert?you

    Git has two commands to undo a commit, git reset and git revert, and only one of them is safe here. Which one, and why?

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

Next episode Git reflog: what happens to the commits you undo

Share this comic

More comics