Git LFS syntax for tracking folder

Find all the files extensions using following command

find . -type f | perl -ne 'print $1 if m/\.([^.\/]+)$/' | sort -u  

and then creating a .gitattribute file and adding git lfs track syntax. This command generates that for you, it tracks all the files and its extensions and creates lfs tracking syntax.

find . -type f | perl -ne 'print $1 if m/\.([^.\/]+)$/' | sort -u | awk '{print $1" filter=lfs diff=lfs merge=lfs -text"}' | sed 's/^/*./'

Write output to the .gitattribute file in folders, subfolders and commit.