Skip to content

Instantly share code, notes, and snippets.

@ovitente
Created December 7, 2020 10:21
Show Gist options
  • Save ovitente/773d6360a268eac637915ec5492a43ee to your computer and use it in GitHub Desktop.
Save ovitente/773d6360a268eac637915ec5492a43ee to your computer and use it in GitHub Desktop.
Git Rebase
git checkout <your-branch>
git reset --soft HEAD~<n> # this is the number of commits you want to squash down
git commit -m "<message>"
git push -f origin <your-branch>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment