git - 文件不存在但 git 认为它存在

标签 git

怎么会?

git push origin master
......
remote: error: GH001: Large files detected.
remote: error: Trace: fdsfdsfdsfds.....
remote: error: See http://git.io/iEPt8g for more information.
remote: error: File some_file.so is 125.70 MB; this exceeds GitHub's file size limit of 100.00 MB
 ! [remote rejected] master -> master (pre-receive hook declined)
error: failed to push some refs to ...

但是

ls some_file.so
ls: cannot access some_file.so: No such file or directory


$ git rm --cached some_file.so
fatal: pathspec 'some_file.so' did not match any files

最佳答案

很可能您提交了文件,然后在以后的提交中删除了它。 GitHub 拒绝文件所在的提交。

GitHub has documentation on how to remove large files from existing commits.

关于git - 文件不存在但 git 认为它存在,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/31636705/

相关文章:

Git "server",通过 SSH key 管理访问

git - git reset 命令之间的区别

git - 我如何告诉 Jenkins 编译存储库的一些而不是所有分支?

git - 全局 git 文件位置 linux

git - "RA layer request failed: REPORT request failed"在 git-svn 期间

git - 为什么 `git checkout <branch> <file>` 会进行更改?

c - 将 C 中的 '#define Version x.x' 与 Git 中的版本标记链接起来

android - 如何正确使用 Git 和 Eclipse 进行 Android 开发?

git - 引用使用 `:/` 语法指定的提交之前的提交?

git - 我应该将 master merge 到一个分支,然后再 merge 回 master 吗?