rtyley / bfg-repo-cleaner

Removes large or troublesome blobs like git-filter-branch does, but faster. And written in Scala
https://rtyley.github.io/bfg-repo-cleaner/
GNU General Public License v3.0
11.05k stars 545 forks source link

error in git rev-list (bad object) #355

Open misterHallodri opened 4 years ago

misterHallodri commented 4 years ago

doing step by step with from this: https://confluence.atlassian.com/bitbucket/use-bfg-to-migrate-a-repo-to-git-lfs-834233484.html

when I do a git push --force I'll get this error:

ref :: Error in git rev-list --stdin --objects --not --remotes=origin --: exit status 128 fatal: bad object

error: failed to push some refs to 'git@bitbucket.org:'

what's going on here?

misterHallodri commented 4 years ago

the only difference is that I did a 'git reflog expire --expire=now --all && git gc --prune=now --aggressive' before the git push --force

javabrett commented 4 years ago

Please review https://github.com/git-lfs/git-lfs/blob/master/docs/man/git-lfs-migrate.1.ronn

Diss31 commented 4 years ago

@misterHallodri Did you solve your problem ? I meet the same error after migrating old objects on LFS thanks to BFG. I just setup my LFS tracking before doing this cleaning, in order to clean my working head. In my case, the bad object ID correspond to my LFS tracking commit, I don't know if it's meaningful.

Diss31 commented 4 years ago

After some tries, this error occurs when you have unpushed modifications and you apply BFG on it. But it's not always the case ...