I'm kinda lost here so I hope you can help me. We use the new Git LFS from GitHub on our servers, and want our designers to use it via the SourceTree app. The Git LFS extension is pretty need because you just need to activate it once, and then you can use your standard git commands (like add/push/commit) without any special extras, LFS just knows to put it somewhere else.
Now I thought that with SourceTree (and the switch to use System Git) this might be possible, too, since SourceTree would just act as some sort of wrapper to the original commands. Sadly, it doesn't work:
git -c diff.mnemonicprefix=false -c core.quotepath=false -c credential.helper=sourcetree add -f -- "Screen Shot 2015-06-01 at 15.29.57.png"
git: 'lfs' is not a git command. See 'git --help'.
Did you mean this?
error: copy-fd: write returned Broken pipe
error: cannot feed the input to external filter git lfs clean %f
error: external filter git lfs clean %f failed 1
error: external filter git lfs clean %f failed
fatal: Screen Shot 2015-06-01 at 15.29.57.png: clean filter 'lfs' failed
Completed with errors, see above
Do I miss something? Should I run it as a different user maybe? If so, how can I do it.
Okay, I found the problem. I am using System Git, yes, but I don't have access to everything in PATH. SourceTree looks for the extensions in the same folder where Git is, so I just have to link to the git-lfs extension, so it seems to be in the same folder as System Git.
ln -s /usr/local/bin/git-lfs /usr/bin/git-lfs
On OS X 10.11 (El Capitan), the /usr/bin folder is now restricted, so the workaround now is to have everything inside /usr/local/bin, and symlink the "git" binary (not git-lfs) there:
ln -s /usr/bin/git /usr/local/bin/git
And then in SourceTree choose the Use System Git from /usr/local/bin.
Hey Seth, thanks for looking into it. We are on Mac, all of us. When I run it via the command line it works like a charm, that's the output: ➜ marketing-lfs git:(master) git push origin master (0 of 1 files) 0 B / 386.41 KB 0.00 % Username for 'http://git-lfs-endpoint';;;: something Password for 'http://git-lfs-endpoint;: (1 of 1 files) 386.41 KB / 386.41 KB 100.00 % 4s Counting objects: 3, done. Delta compression using up to 4 threads. Compressing objects: 100% (3/3), done. Writing objects: 100% (3/3), 385 bytes | 0 bytes/s, done. Total 3 (delta 1), reused 0 (delta 0) To https://git-endpoint e74defe..25d7f77 master -> master One thing that popped into my mind is that I'm using zsh. Might that be a problem? Best, Stefan
Badges are a great way to show off community activity, whether you’re a newbie or a Champion.Learn more
Supported Platforms macOS Windows To make using Sourcetree as simple yet powerful as possible we embed (bundle) dependencies such as Git, Git LFS, and Mercurial. We strive to keep these...
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