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 "<Your single commit message>")
Squashing git-annex branch
git annex forget --drop-dead --force
git push -f origin master
git checkout git-annex
git push -f origin git-annex
... and switching back to the master branch
git checkout master
Deleting synced/...
branches locally
git branch -D synced/master
git branch -D synced/git-annex
Deleting synced/...
branches remotely
git push -d origin synced/master
git push -d origin synced/git-annex
Now git should only be aware of 4 branches in total (2 local and 2 remote)
git branch -a
should print
git-annex
* master
remotes/origin/git-annex
remotes/origin/master
The removed synced/...
branches should be automatically recreated when continuing to work with the repository.
Hi @morales-gregorio, thanks for providing the summary. However, this should be only used when you exactly know what you are doing. For first time-testing, please follow the detailed instructions above.