When your colleagues clone a repository with LFS content, two things are necessary to ensure the LFS pointers are replaced with the real objects.
Firstly, they must have LFS installed on their Git client. For the command line client this means running the "git-lfs install" command, which will add the following lines to the .gitconfig file in their home directory:
clean = git-lfs clean %f
smudge = git-lfs smudge %f
required = true
Next, the committer (you in this case) must have ensured that the .gitattributes file was checked in. This file is updated when you run the "git lfs track" (or untrack) commands. It will have lines like this:
*.jpg filter=lfs diff=lfs merge=lfs -text
*.tif filter=lfs diff=lfs merge=lfs -text
*.png filter=lfs diff=lfs merge=lfs -text
So, with those two things, when your colleagues clone or pull from the repository two things happen. Their Git client knows to run the "git-lfs" filter, and then the filter knows that for each of the file patterns in the .gitattributes file that it should fetch (if necessary) the real objects from LFS.
Hope this helps.
Thanks. It must be the git lfs install that is missing.
I think I was under the impression that .gitconfig gets committed, but I'm seeing it does not.
I was also under the impression that SourceTree had git-lfs installed and didn't need the git lfs install command.
So does that need to be done for every repository or is it global?
Also, it would be awesome if the lfs filter in the gitattributes triggered some sort of warning to tell the user to run git lfs install. Odd thing is: I thought it did give an error about clean and smudge, but my colleague's client never complained.
Thanks again. I'll share this with him and hopefully it will rectify future issues.
The Atlassian Certification you've been waiting for is here for good. We're thrilled to announce the official launch of our new Certification for Project Administration in Jira Server! The offering ...
Connect with like-minded Atlassian users at free events near you!Find a group
Connect with like-minded Atlassian users at free events near you!
Unfortunately there are no AUG chapters near you at the moment.Start an AUG