Skip to content

Instantly share code, notes, and snippets.

What would you like to do?
Merge all commits from a branch into a single commit
git checkout yourBranch
git reset $(git merge-base master $(git rev-parse --abbrev-ref HEAD))
git add -A
git commit -m "one commit on yourBranch"
git push --force
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment