Git remote:错误:对象包含';。吉特';
当推到Github时,我遇到以下错误Git remote:错误:对象包含';。吉特';,git,github,Git,Github,当推到Github时,我遇到以下错误 Counting objects: 16780, done. Delta compression using up to 4 threads. Compressing objects: 100% (10936/10936), done. remote: error: object f4ac3e31afb08298c6cd2ac04c6853940bbab3f6:contains '.git' remote: fatal: Error in object er
Counting objects: 16780, done.
Delta compression using up to 4 threads.
Compressing objects: 100% (10936/10936), done.
remote: error: object f4ac3e31afb08298c6cd2ac04c6853940bbab3f6:contains '.git'
remote: fatal: Error in object
error: pack-objects died of signal 13
error: failed to push some refs to 'git@github.com:omarshammas/repo_name.git'
此git对象f4ac3e31afb08298c6cd2ac04c6853940bbab3f6
抱怨它包含.git
文件夹。我想这是从mercurial迁移到git时造成的
不管怎样,我尝试使用从历史记录中删除.git
文件夹
git filter-branch --force --index-filter \
'git rm -r --cached --ignore-unmatch .git' \
--prune-empty --tag-name-filter cat -- --all
但我还是遇到了错误
我在推送其他远程设备(如(bitbucket/heroku)时没有遇到问题。Github显然有更严格的验证
不确定这是否重要,但正在抱怨的对象是树对象
> git show f4ac3e31afb08298c6cd2ac04c6853940bbab3f6
tree f4ac3e31afb08298c6cd2ac04c6853940bbab3f6
.git/
MIT-LICENSE
README.textile
assets/
init.rb
install.rb
lib/
tasks/
谢谢查看此链接。答案:@abrasadera第一个链接成功了。谢谢如果您将其添加为答案,我将接受。stack将我的答案标记为琐碎,因此必须保留评论中的内容-很高兴帮助您:)