# Squash your commits | GitHub Blog
# https://github.com/blog/2141-squash-your-commits
#
# manual steps
git checkout target/branch
# always do the merge in one new branch, if anything goes wrong, just delete and start again
git checkout -b merge/branch
git merge --squash feature/branch
git add .
git commit -m $'squash feature/branch commits\ncloses #{pull request number}'
git checkout target/branch
git merge merge/branch
git push origin target/branch
git branch -D merge/branch
git push origin :feature/branch
git branch -D feature/branch
useful steps to do a manual git squash commit
Be the first to comment
You can use [html][/html], [css][/css], [php][/php] and more to embed the code. Urls are automatically hyperlinked. Line breaks and paragraphs are automatically generated.