Advanced

How to Undo Last Git Commit

Posted by linuxize on
Linuxize.com
Mail this story
Print this story

Sometimes, when working with Git, you may want to undo the latest commit. A commit is a snapshot of a Git repository at a given time. Git has a reference variable called HEAD that points to the latest commit in the current working branch. To undo a commit, all you need to do is point the HEAD variable to the previous snapshot.



Full Story

  Nav
» Read more about: Story Type: Tutorial; Groups: Community, Developer

» Get new stories by e-mail: nightly or as they are published

« Return to the newswire homepage

  Related stories
» More like this

This topic does not have any threads posted yet!

You cannot post until you login.