Trying to migrate to Github from Bitbucket, getting file size error

懵懂的女人 提交于 2019-12-10 05:47:00

问题


I'm trying to migrate from bitbucket to github. What I did was remove bitbucket from the remote and add my github account instead. I then tried to git push -u origin master but I got a large file detected error and then a this exceeds Github's file size limit of 100MB.

I know which file is making the problem and I've deleted it a few commits ago but since it's still in previous commits it's still making problems.

How can I fix this?


回答1:


GitHub places a hard limit on the size of individual files:

GitHub warns you when you try to add a file larger than 50 MB. We'll reject pushes containing files larger than 100 MB.

If any commit in your repo contains that file, GitHub will not allow you to push to a remote repository hosted on their servers.

Your options?

  1. Stay on Bitbucket, or
  2. rewrite the history of your repo (using, for instance, git filter-branch, or Roberto Tyley's BFG Repo-Cleaner) so that no file exceeding 100 Mb in size be present in any commit of that repo.


来源:https://stackoverflow.com/questions/25389155/trying-to-migrate-to-github-from-bitbucket-getting-file-size-error

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!