关于如何从Google Colab向GitHub存储库添加大文件

时间:2020-09-17 08:43:19

标签: git

我无法从尝试过此代码的colab向GitHub存储库添加大文件:

https://github.com/So-AI-love/Persian-text-to-speech/blob/master/Built%20dataset%20and%20trainning.ipynb

%cd /content/Persian-text-to-speech/
!git pull
!git remote set-url origin https://soheilpaper:%ss!!@github.com/So-AI-love/Persian-text-to-speech.git 
!git remote add upstream https://github.com/AlisterTA/Persian-text-to-speech.git
!git lfs pull
!git lfs track Database
!git lfs push origin master
!git lfs  status
!git add .gitattributes
!git add Database -f

# !git push -u origin master
!git branch -M master
!git branch
!git diff 
!git add -A
!git add Database -f
!git commit -am " wave Database added"
!git remote -v
!git remote show origin
# !git branch -u origin/master
# !git stash
# !git stash apply

!git push -u origin master
# !git lfs fetch origin master
# !git config lfs.<unknown>.locksverify false
!git lfs push origin master --all

我得到这个错误:

* master
On branch master
Your branch is ahead of 'origin/master' by 4 commits.
  (use "git push" to publish your local commits)

nothing to commit, working tree clean
origin  https://soheilpaper:%dddd@github.com/So-AI-love/Persian-text-to-speech.git (fetch)
upstream    https://github.com/AlisterTA/Persian-text-to-speech.git (fetch)
* remote origin
  Fetch URL: https://soheilpaper:%ddd@github.com/So-AI-love/Persian-text-to-speech.git
  HEAD branch: master
  Remote branch:
    master tracked
  Local branch configured for 'git pull':
    master merges with remote master
  Local ref configured for 'git push':
    master pushes to master (fast-forwardable)
Counting objects: 11, done.
Delta compression using up to 2 threads.
Compressing objects: 100% (9/9), done.
Writing objects: 100% (11/11), 462.63 MiB | 29.75 MiB/s, done.
Total 11 (delta 4), reused 1 (delta 0)
remote: Resolving deltas: 100% (4/4), completed with 1 local object.

remote: hooks/pre-receive.rb:51:in `<main>'
remote: error: GH001: Large files detected. You may want to try Git Large File Storage - https://git-lfs.github.com.
remote: error: Trace: 4eb17dfdf5b83ec35cc7600c5af96a0f
remote: error: See http://git.io/iEPt8g for more information.
remote: error: File Database/Bestofgoogoosh_Googoosh.wav is 618.06 MB; this exceeds GitHub's file size limit of 100.00 MB
To https://github.com/So-AI-love/Persian-text-to-speech.git
 ! [remote rejected] master -> master (pre-receive hook declined)
error: failed to push some refs to 'https://soheilpaper:%ssss@github.com/So-AI-love/Persian-text-to-speech.git'

所以,我不知道为什么git lsf在colab中不起作用?!

0 个答案:

没有答案