Recently I had to upload a large file of size ~90MB into my git repository. So I tried with the below command from command line:

root@ut015651:~/xyz# git add abc
root@ut015651:~/xyz# git commit -m "Adding the my large image file."
root@ut015651:~/xyz# git push

But it gives me a error saying “this is larger than GitHub’s recommended maximum file size of 50.00 MB” and hence the push operation fails. I tried to push the file from a windows machine and the same error occurred again. The solution to this is to install Git Large File Storage support. I resolved the issue on my WIndows machine today. The linux solution is similar but I haven’t tried that yet. I will write that when I try.

Windows 10 solution

So if you have already installed Windows Git and your preferred Git client then all you need to do is to install Git Large File Storage aka Git-LFS support. If you do not have Windows Git and any Git client installed on you machine you can refer to my previous post on how to do that How to install and use GIT client on Windows.

To install Git-LFS go to this link https://git-lfs.github.com/ and download the git-lfs and then install it. Now after the installation you might think you have to launch it. But you actually need to do no more steps. You simply try pushing the file again and the Git client with the support of Git LFS will do the rest for you. Isn’t that mazing! This post is incredibly short but that’s what you need for enabling Git to handle the large files. Happy Git-ing.

Leave a Reply