Skip to content

Instantly share code, notes, and snippets.

@L480
Created October 10, 2024 13:55
Show Gist options
  • Save L480/af8183017a67bc8550aeb6575b8d4457 to your computer and use it in GitHub Desktop.
Save L480/af8183017a67bc8550aeb6575b8d4457 to your computer and use it in GitHub Desktop.
Revert pushed commit in git

Move the cursor back to the last known good commit: git push -f origin last_known_good_commit:branch_name

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment