dcsimg
Linux Today: Linux News On Internet Time.





How to Undo Last Git Commit

Nov 09, 2020, 08:00 (0 Talkback[s])
(Other stories by Linuxize)

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.

Complete Story