github upload large files 100MB posture

Latest trying to write a script to configure a key Linux, so we must install some software strategy, but sometimes have to install the source code is better, and some things directly to Github will be very convenient, but also more than 100MB, Github normal circumstances under is allowed to upload files larger than 100MB, but can be directly git LFS.

Specifically OK:
Https://Towardsdatascience.Com/uploading-large-files-to-github-dbef518fa1a
Https://Blog.Csdn.Net/Tyro_java/article/details/53440666

Anyway, is that you can use on the right, the user can have a free 1GB of space for large files.

Concrete is installed git-LFS , to download, and then the operation is the meal:

  1. Start with an empty warehouse in the web
  2. Then build a warehouse with the same folder name, and perform the initialization commands:git init
  3. Then executegit lfs install
  4. Then add the name of the file you want to upload or suffix:git lfs track '*.zip'
  5. Then put the resulting .gitattributesfirst spread to remote repository
    1. git add .gitattributes
    2. git commit -m 'large - init file'
    3. git push -u origin master# First secondary performed such re-transmission back on git pushline.
  6. Then you can add the normal upload large files!
    1. git add bigfile.zip
    2. git commit -m 'upload Big file.'
    3. git push# First secondary performed such re-transmission back on git pushline.

  • Delete remote file repository, but does not remove local files, such asbigfile.zip
    • git rm bigfile.zip
    • git commit -m 'rm bigfile.zip'
    • git push

Guess you like

Origin www.cnblogs.com/5haoanqu/p/11494879.html