Git LFS
Git LFS (Large File Storage) is an extension for big files like images, videos and archives. Git stores a small text pointer, and the real file is kept on an LFS server.
This keeps the repository small and fast to clone. You choose which files go to LFS with git lfs track, which writes the rule to .gitattributes.
Track Photoshop files with LFS
git lfs install
Updated Git hooks.
Git LFS initialized.
git lfs track "*.psd"
Tracking "*.psd"
cat .gitattributes
*.psd filter=lfs diff=lfs merge=lfs -text
git add .gitattributes logo.psd
git commit -m "Add logo with LFS"
[main 9a5e245] Add logo with LFS
2 files changed, 4 insertions(+)
create mode 100644 .gitattributes
create mode 100644 logo.psd
See the files in LFS
Git itself only stores the pointer:
git lfs ls-files
d367d1937e * logo.psd
git show HEAD:logo.psd
version https://git-lfs.github.com/spec/v1
oid sha256:d367d1937ef43accc9b30391a7b994030f85a08ef4e770d34514aaeb52b084ba
size 14