Dealing with Git Corrupt objects and 'has dot

2019-05-11 23:41发布

问题:

I have tried rewriting history using filter branch in order to delete few memory occupying SHA's (~ more than 300 MB) using the below command :

git filter-branch --index-filter \ 'git rm --ignore-unmatch --cached <Filename>' -- 6d5a325^..

though it succeeds rewriting history but post garbage collection when ever I try to push forcefully it gives me the object corruption error.

Also,I would really appreciate if any one could help me in figuring out the 'has dot git' issue in my tree object,as I am unable to rewrite the same as well.

$ git fsck --full
Checking object directories: 100% (256/256), done.
warning in tree f7051a3ab2f578da6603cef99532c829fe2ab7f8: hasDotgit: contains '.git'

Also for reference sake, I have been using gitlab as my repository hosting.

Thanks in advance :)

标签: git gitlab