Skip to content

Instantly share code, notes, and snippets.

@katopz
Created October 8, 2020 17:22
Show Gist options
  • Save katopz/de70952973f6c233b0d5d71263b06497 to your computer and use it in GitHub Desktop.
Save katopz/de70952973f6c233b0d5d71263b06497 to your computer and use it in GitHub Desktop.
Force push on main from head (or other branch) // consider bad practice but sudo it ;p
# Switch main to head
git branch -f main head
# Force push
git push -f origin main
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment