Background
Unfortunately ran into an error trying to upload a big file unto Git.
Git
Git LFS
I thought I had that problem behind me.
Years prior I had set up Git LFS.
By the way, LFS translates to “Large File Support”.
StackOverfow
Googled for help.
Thankfully landed at StackOverfow.
The StackOverfow Q/A Post is availed here:-
Git lfs – “this exceeds GitHub’s file size limit of 100.00 MB”
Link
As I tried some of the options, the most rewarding advice was to use the git lfs migrate option.
Outline
- git lfs
- git lfs migrate import
- git lfs track
- Mark Special Git Files
- git add .gitattributes
git lfs
git lfs migrate option
Syntax
git lfs migrate import --include="<file-name>"
Sample
git lfs migrate import --include="*.bak"
git lfs track
Syntax
git lfs track <file-name>
Sample
git lfs track *.bak
Mark Git Files
git add .gitattributes
Syntax
git add <file-name>
Sample
git add .gitattributes
Git – File – .gitattributes
Review File
Using “type .gitattribute” the command, was able to review the content of the .gitattribute file.
Content – Initial
Image
Textual
>type .gitattributes .bak filter=lfs diff=lfs merge=lfs -text *.bak filter=lfs diff=lfs merge=lfs -text
Explanation
I noticed that the first entry is a typo.
It reads .bak and not *.bak; which is our actual file mask.
Git lfs untrack
Outline
Let us use git lfs untrack to unflag the mislabeled file.
Command
Syntax
git lfs untrack <filemask>
Sample
git lfs untrack ".bak"
Output
Textual
untracking ".bak"
Image
Content – Post
Image
Textual
>type .gitattributes *.bak filter=lfs diff=lfs merge=lfs -text
Explanation
Thankfully, we now only have the single ( *.bak ) entry.
Summary
The depth and breath of git is truly remarkable.