Github – Warning – “… this is larger than GitHub’s recommended maximum file size of 50.00 MB”

Background

In our last post tried uploading Microsoft’s office Excel Viewer to github, but ran into a familiar error\warning.

Referenced Posts

Here are referenced posts :-

  1. Microsoft Office Files Viewer
    Link

 

Error

Error Image

gitLargeFilesDetected.20190317.1143AM.png

Error Text


>git push
Enumerating objects: 8, done.
Counting objects: 100% (8/8), done.
Delta compression using up to 4 threads
Compressing objects: 100% (3/3), done.
Writing objects: 100% (7/7), 73.84 MiB | 712.00 KiB/s, done.
Total 7 (delta 0), reused 0 (delta 0)
remote: warning: GH001: Large files detected. You may want to try Git Large File Storage - https://git-lfs.github.com.
remote: warning: See http://git.io/iEPt8g for more information.
remote: warning: File Excel/Excel2007/RTM/12.0.4518.1071/ExcelViewer.exe is 74.14 MB; this is larger than GitHub's recommended maximum file size of 50.00 MB
To https://github.com/DanielAdeniji/MicrosoftOfficeViewer.git
   c1abc53..5c0f86d  master -> master

Remediation

Git Large File Storage

Outline

Please peruse Git Large File Storage instruction on how to incorporate Git LFS:

Git Large File Storage
Link

  1. Git Command Line Extensions
    • Download Git Command Line Extensions
    • Install
  2. Launch Command Line Shell
    • Access your targeted repository root folder
    • Git Lfs Install
      • Enable lfs for current repository
    • Git lfs track
      • Register files\file types
    • Make sure .gitattributes is tracked
      • git add .gitattributes
    • Commit, as usual
    • Push, as usual

Actual

Download

Download Git LFS for Windows.

It is available here.

And, the current version is 2.71.

Install

Please install the downloaded file

Command Line Shell

I use Command Line Shell and so launched one.

git lfs install
Syntax
git lfs install
git lfs track
Syntax
git lfs track
Actual
git lfs track *.exe
Add .gitattributes
Syntax
git add .gitattributes
Actual
git add .gitattributes
Add Files
Syntax
git add
Actual
git add *.exe
Git Commit
Syntax
git commit
Actual
git commit
Git Push
Syntax
git push
Actual
git push
Output – Image

gitLFSPrep.push.03.20190317.1215PM.PNG

Output – Textual
>git push
Uploading LFS objects: 100% (1/1), 78 MB | 735 KB/s, done
Enumerating objects: 13, done.
Counting objects: 100% (13/13), done.
Delta compression using up to 4 threads
Compressing objects: 100% (5/5), done.
Writing objects: 100% (11/11), 1.18 KiB | 121.00 KiB/s, done.
Total 11 (delta 1), reused 0 (delta 0)
remote: Resolving deltas: 100% (1/1), completed with 1 local object.
To https://github.com/DanielAdeniji/MicrosoftOfficeViewer.git
   4144078..d08a9f8  master -> master

Explanation

 

  1. Indicate LFS Upload
    • Uploading LFS objects: 100% (1/1), 78 MB | 735 KB/s, done

 

Verification

Outline

  1. Review files marked as LFS
    • Locally
    • Uploaded

 

Tasks

Files marked as LFS

Locally

To review the list of files you have marked as LFS, please review your .gitattributes file

Syntax

type .gitattributes

Output
Output – Image

.gitattributes.20190318.0735AM

Output – Textual

*.exe filter=lfs diff=lfs merge=lfs -text

Explanation
  • *.exe
    • filter=lfs

Uploaded Files

To verify if a file is uploaded as an LFS file, please launch a browser and access the file’s URL.

LFS files will be noted as “Stored with Git LFS“.

git.lfs.wordviewer.20190318.0654AM

References

  1. GitHub
    • Git Large File Storage
      Link
    • Versioning Large Files
      Link

Leave a Reply

Please log in using one of these methods to post your comment:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s