Branch to squash on the actual branch.
<commit reference> A commit reference (has to be from the current branch) can also be used as the first argument. A range of commits sha..HEAD will be squashed.
If commit-message is given, commit the squash result.
$ git squash my-other-branch
Squash commit -- not updating HEAD
my-changed-file | 1 +
1 file changed, 1 insertion(+)
$ git commit -m "New commit without a real merge"
$ git squash HEAD~3 "Commit message"