Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Pushing files over 100MB to GitHub

Tags:

git

github

I am trying to push files over 100MB to Github. I have tried all the options I could find, including the GitHub large file extension, but no luck.

I am trying to push from GitHub Desktop currently, as I am pushing over 100 files and this is a workaround, but hoping someone can provide me with some advice or the exact steps to push files over 100MB.

The photo below is what I am getting when trying to do so (file names blurred out due to confidentiality).

enter image description here

like image 644
KyleUSA Avatar asked Nov 28 '25 12:11

KyleUSA


1 Answers

GitHub has a strict file limit of 100MB. So, It's recommended to use Git Large File Storage for your use case.

Git Large File Storage lets you store large files on a remote server such as GitHub.

Download & install git-lfs by placing it into your $PATH.

Run the following command once per local repository:

git lfs install

Large files can be selected by :

git lfs track '*.nc'
git lfs track '*.csv'

It will create a file named .gitattributes, and now you can perform add & commit operations as normal.

Now,

  1. Push the files to the LFS,
  1. Push the pointers to GitHub.

Here are the commands:

git lfs push --all origin master
git push -u origin master

If you wish to pull the repository on another device, simply install git-lfs on that device(per local repository).

like image 142
Amit kumar Avatar answered Dec 01 '25 01:12

Amit kumar



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!