最新消息:雨落星辰是一个专注网站SEO优化、网站SEO诊断、搜索引擎研究、网络营销推广、网站策划运营及站长类的自媒体原创博客

GitHub large file limitation and clearing git history - Stack Overflow

programmeradmin1浏览0评论

I'm trying to migrate a large repository with a couple of thousand branches from Bitbucket to Github. During this process I want to preserve all branches and tags.

My problem is that I have a couple of large files inside the history of the repository and when I try to push all branches, it fails with the github error that it restricts files larger than 100mb.

I've tried the suggested solutions in the first page of google.

git filter-repo does not work, because it thinks I have refs called "FE" and "fe" which I don't, but I can't pass through that.

The most successful one has been to use git filter-branch and remove the large files from the main branch.

The main problem is that with git filter-branch is that is does not clear the history of all branches, just a single one. I have to cycle through all branches and execute the command for each branch. And this takes AGES.

When I execute that command, I can clean just a single branch. How do I remove the file from all branches?

git filter-branch -f --index-filter 'git rm -rf --cached --ignore-unmatch path/to/my/file' HEAD

Can you help me? How do I remove the reference for this large files from all branches and tags at the same time?

发布评论

评论列表(0)

  1. 暂无评论