Warning: file_get_contents(/data/phpspider/zhask/data//catemap/2/github/3.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181

Warning: file_get_contents(/data/phpspider/zhask/data//catemap/7/google-maps/4.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Git remote:错误:对象包含';。吉特';_Git_Github - Fatal编程技术网

Git remote:错误:对象包含';。吉特';

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

当推到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
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将我的答案标记为琐碎,因此必须保留评论中的内容-很高兴帮助您:)