尝试从Bitbucket迁移到Github,获取文件大小错误 [英] Trying to migrate to Github from Bitbucket, getting file size error

查看:143
本文介绍了尝试从Bitbucket迁移到Github,获取文件大小错误的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在尝试从bitbucket迁移到github。我所做的是从远程删除bitbucket,而不是添加我的github帐户。然后我尝试了 git push -u origin master ,但是我得到了一个检测到大文件的错误,然后一个这超过了Github的文件大小限制为100MB

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?

推荐答案

GitHub将< a href =https://help.github.com/articles/working-with-large-files =nofollow>限制单个文件的大小:

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


当您尝试添加大于50 MB的文件时,GitHub会向您发出警告。我们将拒绝包含大于100MB的文件。

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

如果您的仓库中有任何提交包含该文件,GitHub将不允许您推送到他们服务器上托管的远程存储库。

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. 留在Bitbucket上,或者
  2. 重写你的repo的历史记录(例如,使用 git filter-branch 或者Roberto Tyley的 BFG Repo-Cleaner ),以便在该回购的任何提交中不存在超过100 Mb的文件。

  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.

这篇关于尝试从Bitbucket迁移到Github,获取文件大小错误的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆