【发布时间】:2016-01-20 09:33:44
【问题描述】:
我正在尝试将我的应用程序代码从 bitbucket 迁移到 github。我更改了文件夹上的遥控器,但是当我尝试推送我的新存储库时出现错误,因为我添加了一个太大的文件。
我删除了文件然后git add . 并提交了更改,但是当我尝试将代码推送到我的存储库时,我仍然遇到与大文件仍然存在相同的错误:
Counting objects: 7302, done.
Delta compression using up to 4 threads.
Compressing objects: 100% (5689/5689), done.
Writing objects: 100% (7302/7302), 385.41 MiB | 2.14 MiB/s, done.
Total 7302 (delta 3982), reused 3468 (delta 1527)
remote: error: GH001: Large files detected. You may want to try Git Large File Storage - https://git-lfs.github.com.
remote: error: Trace: 22d95f5ef2a2bcab974f9ccbe5819675
remote: error: See http://git.io/iEPt8g for more information.
remote: error: File wefootapp.zip is 351.71 MB; this exceeds GitHub's file size limit of 100.00 MB
To git@github.com:davidgeismar/wefootapp.git
! [remote rejected] master -> master (pre-receive hook declined)
error: failed to push some refs to 'git@github.com:davidgeismar/wefootapp.git'
git应该怎么做才能知道文件被删除了?
【问题讨论】:
-
你用“git rm”删除了文件吗?
-
@DenisFrezzato 你能解释一下这个文件是什么吗?
-
"git rm /path/to/file" 是一个 git 命令,用于从工作树和索引中删除文件。参考:git-scm.com/docs/git-rm
-
感谢丹尼斯,正如我在下面所说的,我试过了,但我得到了
➜ wefootapp git:(master) git rm /Users/davidgeismar/wefootapp/wefootapp.zip fatal: pathspec '/Users/davidgeismar/wefootapp/wefootapp.zip' did not match any files
标签: git github repository