Skip to content

Instantly share code, notes, and snippets.

@adamlutz
Created May 15, 2025 18:47
Show Gist options
  • Save adamlutz/4d44dcb3786b79eb432e91c3e4dfcf87 to your computer and use it in GitHub Desktop.
Save adamlutz/4d44dcb3786b79eb432e91c3e4dfcf87 to your computer and use it in GitHub Desktop.
git merge-base squash
git merge-base HEAD origin/main
git reset --soft <commit-hash-from-previous-step>
git commit -a -m "Squash commit, the one that will show up"
git push origin --force-with-lease
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment