Git/Squash
- Goal - branch with multiple commits, and master merges, tidy to single commit.
- If master branch is fork of upstream first get master branch up to latest version
e.g. git checkout master ; git merge upstream/master
Now checkout feature branch with multiple commits, soft reset to master and commit all changes as one commit
git checkout feature_branch git reset --soft master git add -A && git commit -m "commit message goes here"
If the branch was pushed up to origin before you might have to force the push
git push --force