Created
January 10, 2021 17:03
-
-
Save mvidaldp/ac530e32e4cb26c29bd92d27e2f31ae1 to your computer and use it in GitHub Desktop.
Tell git lfs to track multiple files (bigger than 50MB) from a list of files
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# assuming you are on your git repo folder and you generated a large file list (bigger than 50MB in this case), e.g.: | |
# find . -size +50M | cat >> file-list.txt | |
flist="file-list.txt" | |
while IFS= read -r file | |
do | |
git lfs track "$file" | |
done < "$flist" | |
# do not forget to run `git add .gitattributes` afterwards, before you add and commit the large files |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment