When pushing to Github I encounter the following error
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'
This git object f4ac3e31afb08298c6cd2ac04c6853940bbab3f6
complains that it contains the .git
folder. I imagine this was caused when migrating over from mercurial to git.
Anyways, I tried removing the .git
folder from the history using
git filter-branch --force --index-filter \
'git rm -r --cached --ignore-unmatch .git' \
--prune-empty --tag-name-filter cat -- --all
But I still encounter the error.
I haven't had a problem pushing to other remotes such as (bitbucket / heroku). Github apparently has more stringent validations in place.
Not sure if it matters, but the object that is complaining is a tree object.
> git show f4ac3e31afb08298c6cd2ac04c6853940bbab3f6
tree f4ac3e31afb08298c6cd2ac04c6853940bbab3f6
.git/
MIT-LICENSE
README.textile
assets/
init.rb
install.rb
lib/
tasks/
Thanks