I make new branch from master
with:
git checkout -b testbranch
I make 20 commits into it.
Now I want to squash those
Solution for people who prefer clicking:
Install sourcetree (it is free)
Check how your commits look like. Most likely you have something similar to this
Right click on parent commit. In our case it is master branch.
You can squash commit with previous one by clicking a button. In our case we have to click 2 times. You can also change commit message
Results are awesome and we are ready to push!
Side note: If you were pushing your partial commits to remote you have to use force push after squash