Skip to content

Instantly share code, notes, and snippets.

@alexxxdev
Created October 29, 2018 03:18
Show Gist options
  • Save alexxxdev/83ea158f99adebaca9ad008c261f0d65 to your computer and use it in GitHub Desktop.
Save alexxxdev/83ea158f99adebaca9ad008c261f0d65 to your computer and use it in GitHub Desktop.
# Reset the index and working tree to the desired tree
# Ensure you have no uncommitted changes that you want to keep
git reset --hard 56e05fced
# Move the branch pointer back to the previous HEAD
git reset --soft HEAD@{1}
git commit -m "Revert to 56e05fced"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment