Get GIT LFS working in Sourcetree

Asbjørn Mikkelsen March 30, 2017

Why cant sourcetree be updated to understand LFS?

I created an repository, added .gitattributes with this content:

Libraries/**/* filter=lfs diff=lfs merge=lfs -text

When I commit files that is in that folder, they are moved to LFS.

When develeoper2, pulls the repository, then he get the indexfiles, and need to do an separate Git LFS-> Pull LFS Content.
But, when doing so, sourcetree marks the files as unstaged, that is, lot of changes because they now are the fulll files, not the index files, and thus it wants you to commit these files again.
When developer2 then commits these, then they are no longer LFS files in the repository (very visible in Bitbucket website).
Then I pull the repository, and get these changed files, and not sourcetree marked one of the files as changed, and wants me to check them again.


What the h**l is going on ? 
Using version 1.9.10.0, and Embedded git, 2.10.2 + git-lfs v1.5.2 + Git LFS Bitbucket adapter v1
Developer 2 is using system git, with versions 
git, 2.11.x + git-lfs v1.5.2 + Git LFS Bitbucket adapter v1

 

1 answer

1 vote
Asbjørn Mikkelsen March 30, 2017

And BTW, THIS NEED to work soon, we are having problems with our repository site on Bitbucket because we cannot enable our main repository for LFS, the repository mentioned here is an small repository to test the features again, to see if this ever will work.

Martin Tanguay September 20, 2017

I have the same issue, LFS files are always detected as modified (unstaged).

I use SourceTree 2.3.1.0 with Embedded Git 1.9.5 and Git-LFS 2.0.2.

Any input from Atlassian on that issue ?

Asbjørn Mikkelsen September 20, 2017

Update git, it works good now with embedded git 2.14.1, and git-lfs 2.0.2

Martin Tanguay September 20, 2017

Thanks.  We just found the same work-around :-)

Like João Xavier likes this
jyo
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
September 21, 2017

Hi guys,

I've mentioned this to the SourceTree developer team. We're going to be including newer versions of Git / Git-LFS in the next release. Thanks for bring this to our attention.

Cheers,

Jesse

minnsey
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
September 22, 2017

Sourcetree for Windows 2.3.1 ships with Git 2.14.1 and LFS 2.0.2.
But you will need to trigger the 'Update Embedded Git' option in the Tools/Options/Git tab if you are currently running with an earlier version of Git/LFS.
Thanks

Thomas Olson September 25, 2017

Yes, please. I have been a game artist for over 14 years. The engineers and artists are always at war over which Source Control to use. Programmers don't mind typing a small book into a little window full of code to do anything, and artists like me want to know which button to push. Sourcetree has buttons that say pull and push and pull LFS. But then my engineer tells me I have to open the Terminal and type "git LFS pull". And then these forums tell me that despite what instructors and others have said, LFS is not really part of the git/Sourcetree source control, and locking files (which is VITAL for art assets on games) is another code/Terminal based activity file by file. 
Yet, programmers hate Perforce, which is very easy to use, and makes sure you have to check out and check in your files so no one stomps work.
Sorry to vent. But I (an game artist) don't understand two things:
--why is so hard/different to build in binary file support?
--why do so many company making software tools (including 3D art tools) seem to look at game development--which is a based on a lot of binary files being controlled by a lot of code--treated as an anomaly? 
There are probably good reasons (there usually are, when I talk to a programmer). But I add my voice to Asbjorn's. I've spent half a day trying to get my pngs! They show up, and have .png, but are all unreadable 1k files.
Any help or speedy implementation of GUI based LFS would be gratefully appreciated :D

Asbjørn Mikkelsen September 26, 2017

It's fine that 2.3.1 includes newer git, but fix this "update embedded git", it have been mentioned several places, it often does not work, and complains about the 7z file. Shouldn't be that hard to unzip an archive.

minnsey
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
October 4, 2017

Please ensure there are no running Git/SSH or Authentication prompts before running the 'Update Embedded Git' Sourcetree does attempt to shut down anything it is aware of, but on occasion Git itself can trigger processes like authentication.

Yes it is true that LFS is an add-on to Git not a core part, as such it can sometimes be dependent on out of fync updates to the various parts.

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events