Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save brandhill/18845c14bc98e51bb713274c8bc14e2d to your computer and use it in GitHub Desktop.
Save brandhill/18845c14bc98e51bb713274c8bc14e2d to your computer and use it in GitHub Desktop.
remove commit from remote branch
git reset HEAD^ # remove commit locally
git push origin +HEAD # force-push the new HEAD commit
git push origin +HEAD^:<name of your branch, most likely 'master'> # Ex: git push origin +HEAD^:Ring_master
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment