Here we are reducing the commit log of git and git-annex branches to a single commit. The following lines assume the repository has only a single remote 'origin', on which the history of the commits will also be reduced to a single commit. Note: Don't change the history of publicly shared repositories as this will lead to in inconsistent histories between different local copies of the repository.
Squashing the master branch
git reset $(git commit-tree HEAD^{tree} -m "")