Handle uploading on GitHub that does not allow 100MB large files

Source: Internet
Author: User

Use GitHub for the first time today to manage your project code. The project used the Baidu Navigation SDK, because Baidu Navigation SDK is larger than 100MB, so when submitting code to GitHub error. Specific information is as follows:
Total 3007 (Delta 664), reused 0 (Delta 0)
Remote:error:GH001:Large files detected.
Remote:error:trace:7b7de6b9372ee392e0f3961b05ea6f33
Remote:error:See http://git.io/iEPt8g for more information.
Remote:error:File xxx/xxx/baidunavisdk/libbaidunavisdk.a is 102.68 MB; This exceeds GitHub ' s file size limit of 100.00 MB
Remote:error:File xxx/xxx/baidunavisdk/libbaidunavisdk.a is 102.68 MB; This exceeds GitHub ' s file size limit of 100.00 MB. GitHub asks for a length limit of 100MB or less. It also prompts us to go to (http://git.io/iEPt8g) how to handle uploading large files. I began to follow the original operation, the result is still the error. Later I wrestling, is not oneself understand wrong original author's meaning. Sure enough, I later added a command to ignore libbaidunavisdk.a in the. gitinore file to upload your own files successfully.
Here's how:
When we upload a project that contains files larger than 100MB. We first have to ignore it in the. Gitinore.
Then, in the most recent commit, remove the file from both the local repository and the remote repository. If this file is important, remember to do a backup.
If this file is the last commit and you have not yet been push to GitHub
The first step: ignore the big file names you need to ignore in. Gitinore (as with ignoring general files)
Cat. Gitinorevi. gitinore*.libbaidunavisdk.a

Step two: Remove large files from the local warehouse

git rm--cached/user/xxx/xxx/xxx/libbaidunavisdk.a (/user/xxx/xxx/xxx/libbaidunavisdk.a for the files that you want to remove)

Step three: Submit our actions

git commit--amend-chead

After performing this step, LIBBAIDUNAVISDK.A will be removed from your commit repository.
At this point, the push to the remote server succeeds.



Michlemin
Links: http://www.jianshu.com/p/09a2d9db861c
Source: Pinterest
Copyright belongs to the author. Commercial reprint please contact the author for authorization, non-commercial reprint please specify the source.



Handle uploading on GitHub that does not allow 100MB large files

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.