【发布时间】:2014-06-19 16:53:25
【问题描述】:
我们有一个远程 git 存储库,其中没有文件大小限制,我们已将 300MB 推入其中。然后我们意识到了这一点,然后从存储库中删除了该文件。
同时将相同的存储库添加到 github,当我们尝试将更改推送到 github 时,我们会收到大文件大小错误。
remote: error: File dir/filename is 312.27 MB; this exceeds GitHub's file size limit of 100 MB
为了解决这个问题,我尝试使用How to remove/delete a large file from commit history in Git repository? 建议的交互式 git rebase 解决方案,但在 rebase 操作结束时,当我执行 git status
[18:10:35] $ git status
On branch master
Your branch and 'origin/master' have diverged,
and have 8 and 24 different commits each, respectively.
(use "git pull" to merge the remote branch into yours)
如果我使用 git pull 那么我删除的所有更改都会被带回 git 存储库。我该如何解决这个问题?
【问题讨论】:
标签: git github git-branch git-merge rebase