Skip to content

Instantly share code, notes, and snippets.

@ukor
Created June 20, 2021 20:45
Show Gist options
  • Select an option

  • Save ukor/6397334ae4c9d70a293c5aa8f50d5248 to your computer and use it in GitHub Desktop.

Select an option

Save ukor/6397334ae4c9d70a293c5aa8f50d5248 to your computer and use it in GitHub Desktop.
Squash Commit
SQUASH COMMIT
git checkout yourBranch
git reset --soft HEAD~$(git rev-list --count HEAD ^MAIN_BRANCH_NAME)
git add -A
git commit -m "one commit on yourBranch"
From
https://stackoverflow.com/a/47837371/3501729
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment