SQLTerminal.app
now available

XPath.app
now available
Want fresh tech tips in your inbox?

How to Remove Your Last Git Commit

       

Remove your last commit (if you haven't pushed yet)

git reset --hard HEAD~1

To see changes that have been committed and their position in HEAD

git reflog 

And to undo your previous reset and advance the cursor to the reference immediately behind the current state

git reset --hard HEAD@{1}

If you have already pushed you can

git revert HEAD

which will reverse your last commit by creating a new commit

Tagged w/ #commit #git #hard #head #reset #source control #workflowgit

Apps I've Built

XPath Expression Editor
Practice and improve your XPath skills with XPath Editor
Click to buy on the App Store
Photo Location Changer
Easily change the location on your photos and videos
Click here for more info about the app
Photo Date Changer
Easily change the dates and times on your photos and videos
Click here for more info about the app
VocabReminder
English dictionary with notifications so you won't forget what you're studying!
Click here for more info about the app
VocabQuiz
The app that quizzes and scores you on your vocabulary!
Click here for more info about the app