How to clean the git
git fsck
git reflog
git reflog expire --expire=now --all
git gc --prune=now
git reflog expire --expire=now --all
git reflog
# reflog should be cleaned
michael@rei:~/stl/_devops/chef-sl_policy_import(master)$ git gc --prune=now
Counting objects: 409, done.
Delta compression using up to 8 threads.
Compressing objects: 100% (304/304), done.
Writing objects: 100% (409/409), done.
Total 409 (delta 215), reused 126 (delta 56)
michael@rei:~/stl/_devops/chef-sl_policy_import(master)$ git fsck
Checking object directories: 100% (256/256), done.
Checking objects: 100% (409/409), done.