/ git

HOWTO remove all dangling commits from your git repository

copy from http://www.tekkie.ro/news/howto-remove-all-dangling-commits-from-your-git-repository/

git fsck --full
git reflog expire --expire=now --all
git gc --prune=now