It is possible that this is an error in the documentation of the subtree command.
The manual in git states:
options for 'add', 'merge', 'pull' and 'push'
--squash merge subtree changes as a single commit
If you check the more extended documentation in the original subtree project you will notice that the --squash
option is only explained for add
and merge
, as the functionality is described for the process of bringing content into your repository. Since pull
is a modified form of merge, it is also implied that it can use --squash
.
The push
in the manual list what does not make sense. The git subtree push
subcommand is a combination of git subtree split
and git push
. This means that --squash
should be an option also supported by split
, but split
is not listed in the manual list. It is neither ever stated in the documentation that it can use --squash
.
The --squash
option is indeed accepted by split
and push
without error, but after experiment with it it seems it makes no difference, just as your example states. My take is that it is there by mistake and just ignored by the split
and push
commands.