Skip to content

Instantly share code, notes, and snippets.

@Phoenix124
Created November 16, 2021 10:29
Show Gist options
  • Save Phoenix124/492d59899f267ca8ed9cac63f141f41d to your computer and use it in GitHub Desktop.
Save Phoenix124/492d59899f267ca8ed9cac63f141f41d to your computer and use it in GitHub Desktop.
Squash commits in branch
git merge-base HEAD BRANCH_YOU_BRANCHED_FROM
git reset --soft COMMIT_HASH
git commit -am 'This is the new re-created one commit'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment