Skip to content

Instantly share code, notes, and snippets.

View Bunlong's full-sized avatar
🚀
= [ 'Thinking a lot', 'Coding a little' ]

Bunlong VAN Bunlong

🚀
= [ 'Thinking a lot', 'Coding a little' ]
View GitHub Profile
@Bunlong
Bunlong / git-squash-all-commits-into-single-commit.md
Last active December 23, 2020 09:41
Git squash all commits into single commit.

How to squash all commits into single commit?

Reset the index to master

git checkout yourBranch
git reset $(git merge-base master yourBranch)
git add -A
git commit -m "one commit on yourBranch"
git push --force