It's not the same without you

Join the community to find out what other Atlassian users are discussing, debating and creating.

Atlassian Community Hero Image Collage

Get GIT LFS working in Sourcetree

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, 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

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.

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

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

Any input from Atlassian on that issue ?

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

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

Like João Xavier likes this
jyo Atlassian Team Sep 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.



minnsey Atlassian Team Sep 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.

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

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 Oct 04, 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
Community showcase
Published in Sourcetree

Sourcetree for Windows - CVE-2019-11582 - Remote Code Execution vulnerability

A vulnerability has been published today in regards to Sourcetree for Windows.  The goal of this article is to give you a summary of information we have gathered from Atlassian Community as a st...

4,935 views 0 12
Read article

Community Events

Connect with like-minded Atlassian users at free events near you!

Find an event

Connect with like-minded Atlassian users at free events near you!

Unfortunately there are no Community Events near you at the moment.

Host an event

You're one step closer to meeting fellow Atlassian users at your local event. Learn more about Community Events

Events near you