bfg-repo-cleaner icon indicating copy to clipboard operation
bfg-repo-cleaner copied to clipboard

Doing an LFS migration, it fails when git push

Open zhangshiyu12345 opened this issue 11 months ago • 1 comments

After these steps are completed, an error is reported, and how do I resolve it?

$ git clone --mirror heavy-repo # a 'bare' repo, with all branches and tags $ cd heavy-repo.git # Now is a good time to make a backup!

$ java -jar ~/bfg-1.12.5.jar --convert-to-git-lfs '*.wav' --no-blob-protection

the BFG rewrites history, extracting files to lfs/objects and adding .gitattributes for LFS tracking

$ git reflog expire --expire=now --all && git gc --prune=now $ git lfs init

let's push everything up to your Git LFS-enabled hosting provider:

$ git remote set-url origin [email protected]:some-org/heavy-repo.git $ git push # because you cloned using --mirror, this will push ALL branches and tags

error: $ git push Total 0 (delta 0), reused 0 (delta 0), pack-reused 0 (from 0) To http://192.168.10.146/xxxxxx.git ! [remote rejected] refs/keep-around/8af9d260b4a83de07e42a99ede3cfcf8c76663db -

refs/keep-around/8af9d260b4a83de07e42a99ede3cfcf8c76663db (deny updating a hid den ref) error: failed to push some refs to 'http://192.168.10.146/xxxxxxxxxxxx lish.git'

zhangshiyu12345 avatar Dec 30 '24 16:12 zhangshiyu12345

Hi there! I am curious if you ever found a solution? Thanks

ghost avatar May 15 '25 19:05 ghost