Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
1.2k views
in Technique[技术] by (71.8m points)

git - Upload file > 25 MB on Github

I have a file that I want to add to Github. Its size is more than 25 MB limit of github. It is a csv file. How can I upload it on Github.

Steps followed till now

$ cd path_of_directory
$ git lfs install
$ git lfs track "*.csv"
$ git add Filename.csv
$ git commit -m "Filename.csv"

Till here everything is fine. I get below success message:

$ git commit -m 'FileName.csv'
[master (root-commit) 3f089ff] FileName.csv
 1 file changed, 3 insertions(+)
 create mode 100644 Downloads/Folder_of_file/FileName.csv


$ git push origin master

This gives error

fatal: 'origin' 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.
See Question&Answers more detail:os

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Answer

0 votes
by (71.8m points)

Files that you add to a repository via a browser are limited to 25 MB per file. You can add larger files, up to 100 MB each, via the command line.

Refer this page.

If you need to upload greater file than 100 mb then Git LFS might be suitable for you.


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

2.1m questions

2.1m answers

60 comments

57.0k users

...