Skip to content

Instantly share code, notes, and snippets.

@c0ldlimit
Last active October 12, 2015 23:58
Show Gist options
  • Save c0ldlimit/4106750 to your computer and use it in GitHub Desktop.
Save c0ldlimit/4106750 to your computer and use it in GitHub Desktop.
Git: Hard Reset #git #c0ldlimit
git reset --hard HEAD
# the --hard flag puts the content of whatever is in the targeted commit (in this case, HEAD) into both the working directory and staging area
# roll back individual files
git checkout
git checkout HEAD file.ext
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment