If there are existing files in your repository that youâd like to use with GitHub, you need to first remove them from the repository and then add them to Git LFS locally. For more information, see Moving a file in your repository to Git Large File Storage.
Change your current working directory to an existing repository youâd like to use with Git LFS.
To associate a file type in your repository with Git LFS, enter git lfs track followed by the name of the file extension you want to automatically upload to Git LFS.
For example, to associate a .psd file, enter the following command:
$ git lfs track "*.psd"> Tracking "*.psd"
Every file type you want to associate with Git LFS will need to be added with git lfs track. This command amends your repositoryâs .gitattributes file and associates large files with Git LFS.
Add a file to the repository matching the extension youâve associated:
git add path/to/file.psd
Commit the file and push it to GitHub:
git commit -m "add file.psd"git push
You should see some diagnostic information about your file upload: