Skip to content

Instantly share code, notes, and snippets.

View nrwinner's full-sized avatar
🏠
Working from home

Nick Winner nrwinner

🏠
Working from home
  • Baltimore, MD
  • 10:04 (UTC -04:00)
View GitHub Profile
@mgibowski
mgibowski / git-revert-sha-commit
Created August 1, 2012 08:46
[git] revert to a commit by sha hash
# found at:
# http://stackoverflow.com/questions/1895059/git-revert-to-a-commit-by-sha-hash
# reset the index to the desired tree
git reset --hard 56e05fced
# move the branch pointer back to the previous HEAD
git reset --soft HEAD@{1}
git commit -m "Revert to 56e05fced"