Skip to content

Instantly share code, notes, and snippets.

@tyluudinh
Last active June 9, 2021 04:03
Show Gist options
  • Save tyluudinh/ccfef31b9dcdda8873f38e0fe6569c6e to your computer and use it in GitHub Desktop.
Save tyluudinh/ccfef31b9dcdda8873f38e0fe6569c6e to your computer and use it in GitHub Desktop.
Git revert commit and push to remote
  1. git log to check commit [ID]
  2. git reset --hard [commit ID]
  3. git commit -m "Commit message"
  4. git push -f origin [remote branch]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment