使用lfs在github上上传大文件

时间:2019-03-11 08:47:42

标签: github git-lfs

自昨天以来,我一直在尝试在GitHub上推送带有ML模型的大文件,但到目前为止还没有做到。我正在使用lfs,但似乎无法识别我的文件。我想知道我的ml文件是否仍被跟踪,因此使用git reset Head取消了运行,但是没有用。

这是我收到的错误消息

Last login: Mon Mar 11 08:05:10 on console
Nacires-MBP:~ Nacire$ cd /Users/Nacire/Desktop/WildMarketApp 
Nacires-MBP:WildMarketApp Nacire$ git status
On branch master
Changes to be committed:
  (use "git reset HEAD <file>..." to unstage)

    new file:   WildMarket/Model /FlowerClassifier.mlmodel

Changes not staged for commit:
  (use "git add <file>..." to update what will be committed)
  (use "git checkout -- <file>..." to discard changes in working directory)

    modified:   Pods/Pods.xcodeproj/xcuserdata/Nacire.xcuserdatad/xcschemes/xcschememanagement.plist
    modified:   WildMarket.xcodeproj/project.pbxproj
    modified:   WildMarket.xcodeproj/xcuserdata/Nacire.xcuserdatad/xcschemes/xcschememanagement.plist
    modified:   WildMarket/Model /FlowerClassifier.mlmodel
    modified:   WildMarket/Models.scnassets/boxing.scn

Nacires-MBP:WildMarketApp Nacire$ git reset HEAD FlowerClassifier.mlmodel
Unstaged changes after reset:
M   Pods/Pods.xcodeproj/xcuserdata/Nacire.xcuserdatad/xcschemes/xcschememanagement.plist
M   WildMarket.xcodeproj/project.pbxproj
M   WildMarket.xcodeproj/xcuserdata/Nacire.xcuserdatad/xcschemes/xcschememanagement.plist
M   WildMarket/Model /FlowerClassifier.mlmodel
M   WildMarket/Models.scnassets/boxing.scn
Nacires-MBP:WildMarketApp Nacire$ git status
On branch master
Changes to be committed:
  (use "git reset HEAD <file>..." to unstage)

    new file:   WildMarket/Model /FlowerClassifier.mlmodel

Changes not staged for commit:
  (use "git add <file>..." to update what will be committed)
  (use "git checkout -- <file>..." to discard changes in working directory)

    modified:   Pods/Pods.xcodeproj/xcuserdata/Nacire.xcuserdatad/xcschemes/xcschememanagement.plist
    modified:   WildMarket.xcodeproj/project.pbxproj
    modified:   WildMarket.xcodeproj/xcuserdata/Nacire.xcuserdatad/xcschemes/xcschememanagement.plist
    modified:   WildMarket/Model /FlowerClassifier.mlmodel
    modified:   WildMarket/Models.scnassets/boxing.scn

Nacires-MBP:WildMarketApp Nacire$  brew install git-lfs
Updating Homebrew...
==> Auto-updated Homebrew!
Updated 1 tap (homebrew/core).
==> Updated Formulae
angular-cli                lolcat                     pygobject3
bit                        mmark                      terraform-inventory
gobject-introspection      monero

Warning: git-lfs 2.7.1 is already installed and up-to-date
To reinstall 2.7.1, run `brew reinstall git-lfs`
Nacires-MBP:WildMarketApp Nacire$ git lfs track "*.mlmodel"
Tracking "*.mlmodel"
Nacires-MBP:WildMarketApp Nacire$ git add .gitattributes
Nacires-MBP:WildMarketApp Nacire$ git add FlowerClassifier.mlmodel
fatal: pathspec 'FlowerClassifier.mlmodel' did not match any files
Nacires-MBP:WildMarketApp Nacire$ git add WildMarket/Model /FlowerClassifier.mlmodel
fatal: /FlowerClassifier.mlmodel: '/FlowerClassifier.mlmodel' is outside repository
Nacires-MBP:WildMarketApp Nacire$ git commit -m "untracked ml model"
[master fabac5d] untracked ml model
 2 files changed, 1 insertion(+)
 create mode 100644 WildMarket/Model /FlowerClassifier.mlmodel
Nacires-MBP:WildMarketApp Nacire$ git status
On branch master
Changes not staged for commit:
  (use "git add <file>..." to update what will be committed)
  (use "git checkout -- <file>..." to discard changes in working directory)

    modified:   Pods/Pods.xcodeproj/xcuserdata/Nacire.xcuserdatad/xcschemes/xcschememanagement.plist
    modified:   WildMarket.xcodeproj/project.pbxproj
    modified:   WildMarket.xcodeproj/xcuserdata/Nacire.xcuserdatad/xcschemes/xcschememanagement.plist
    modified:   WildMarket/Model /FlowerClassifier.mlmodel
    modified:   WildMarket/Models.scnassets/boxing.scn

no changes added to commit (use "git add" and/or "git commit -a")
Nacires-MBP:WildMarketApp Nacire$ git add .
Nacires-MBP:WildMarketApp Nacire$ git status
On branch master
Changes to be committed:
  (use "git reset HEAD <file>..." to unstage)

    modified:   Pods/Pods.xcodeproj/xcuserdata/Nacire.xcuserdatad/xcschemes/xcschememanagement.plist
    modified:   WildMarket.xcodeproj/project.pbxproj
    modified:   WildMarket.xcodeproj/xcuserdata/Nacire.xcuserdatad/xcschemes/xcschememanagement.plist
    modified:   WildMarket/Model /FlowerClassifier.mlmodel
    modified:   WildMarket/Models.scnassets/boxing.scn

Nacires-MBP:WildMarketApp Nacire$ git push master
fatal: 'master' does not appear to be a git repository
fatal: Could not read from remote repository.

Please make sure you have the correct access rights
and the repository exists.

  Nacires-MBP:WildMarketApp Nacire$ git push origin master
Uploading LFS objects: 100% (1/1), 229 MB | 0 B/s, done                         
Counting objects: 1137, done.
Delta compression using up to 4 threads.
Compressing objects: 100% (1097/1097), done.
error: RPC failed; curl 56 LibreSSL SSL_read: SSL_ERROR_SYSCALL, errno 54
fatal: The remote end hung up unexpectedly
Writing objects: 100% (1137/1137), 239.79 MiB | 267.00 KiB/s, done.
Total 1137 (delta 350), reused 0 (delta 0)
fatal: The remote end hung up unexpectedly
Everything up-to-date

  Nacires-MBP:WildMarketApp Nacire$ git status
On branch master
Changes to be committed:
  (use "git reset HEAD <file>..." to unstage)

    modified:   Pods/Pods.xcodeproj/xcuserdata/Nacire.xcuserdatad/xcschemes/xcschememanagement.plist
    modified:   WildMarket.xcodeproj/project.pbxproj
    modified:   WildMarket.xcodeproj/xcuserdata/Nacire.xcuserdatad/xcschemes/xcschememanagement.plist
    modified:   WildMarket/Model /FlowerClassifier.mlmodel
    modified:   WildMarket/Models.scnassets/boxing.scn

   Nacires-MBP:WildMarketApp Nacire$ git push origin master
Uploading LFS objects: 100% (1/1), 229 MB | 0 B/s, done                         
Counting objects: 1137, done.
Delta compression using up to 4 threads.
Compressing objects: 100% (1097/1097), done.
Writing objects: 100% (1137/1137), 239.79 MiB | 100.00 KiB/s, done.
Total 1137 (delta 351), reused 0 (delta 0)
remote: Resolving deltas: 100% (351/351), done.
remote: error: GH001: Large files detected. You may want to try Git Large File Storage - https://git-lfs.github.com.
remote: error: Trace: 00e5ad3cab2d0130b8d7e347edd8e2eb
remote: error: See http://git.io/iEPt8g for more information.
remote: error: File WildMarket/Model /FlowerClassifier.mlmodel is 218.53 MB; this exceeds GitHub's file size limit of 100.00 MB
To https://github.com/nacire/WM.git
 ! [remote rejected] master -> master (pre-receive hook declined)
error: failed to push some refs to 'https://github.com/nacire/WM.git'

  Nacires-MBP:WildMarketApp Nacire$

你能帮忙吗?

谢谢 肚脐

0 个答案:

没有答案