Undo changes

Undoing Things

At any stage, you may want to undo something. Here, we’ll review a few basic tools for undoing changes that you’ve made. Be careful, because you can’t always undo some of these undos. This is one of the few areas in Git where you may lose some work if you do it wrong.

Undo options

  • Amend (add something more)

  • Restore (modified)

  • Restore (staged)

  • Reset (committed)

  • Revert (pushed)

Last updated