Dealing with Git Corrupt objects and 'has dot git' in tree

血红的双手。 提交于 2019-12-07 17:50:51

问题


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 :)

来源:https://stackoverflow.com/questions/34513597/dealing-with-git-corrupt-objects-and-has-dot-git-in-tree

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!