Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

'git-lfs' was not found on your path in SourceTree #853

Closed
pajapro opened this issue Nov 21, 2015 · 18 comments
Closed

'git-lfs' was not found on your path in SourceTree #853

pajapro opened this issue Nov 21, 2015 · 18 comments

Comments

@pajapro
Copy link

pajapro commented Nov 21, 2015

I downloaded Github for MAC OS and setup git lfs for my repo. All works great when I am using my repo with Github MAC app. When I open the same repo with SourceTree and push to remote, I get the following error:

This repository is configured for Git LFS but 'git-lfs' was not found on your path. If you no longer wish to use Git LFS, remove this hook by deleting .git/hooks/pre-push.

I know that my SourceTree app is using the System Git version. How do I set the 'git-lfs' into my path? And why does 'git-lfs' complains in one client and not in the other one?

@technoweenie
Copy link
Contributor

There's a similar bug filed in #846. I think you'll have to go to SourceTree support. I have no idea how it manages its git version and paths.

@johndkane
Copy link

@pprochazka72 I had the same problem and received the same error message using Source Tree 1.8.2.2 on Windows. For me the solution was to open the Source Tree Terminal window and inspect the paths and locations of files there. Ultimately I copied the git-lfs executable into one of the folders being searched on the path.

To help troubleshoot the path I injected more output into the error message window by editing the script file mentioned by the error message: '.git/hooks/pre-push' and added the command 'which git-lfs' to the output. It spit out a list of paths being searched. I copied the git-lfs executable into one of those.

These are steps to help troubleshoot. I won't specify any more granularity because the environments differ and this information should be enough to help some other people having the same issue.

@chocolim
Copy link

chocolim commented Apr 6, 2016

I delete .git/hooks/pre-push in my local repository and it worked for me

@qin-nz
Copy link

qin-nz commented Apr 29, 2016

@chocolim delete .git/hooks/pre-push means you will not use git-lfs. You will just commit your large file into your git repository.
Just try push your code by using command line.

@qin-nz
Copy link

qin-nz commented Apr 29, 2016

@pprochazka72 You may config SourceTree use git within it self.
Your SourceTree will not find git-lfs in your system PATH.
I use SmartGit, and I use follow command to make git-lfs available for my SmartGit. You can modify it for your SourceTree

ln /Applications/SmartGit.app/Contents/Resources/git/bin/git-lfs /Applications/GitHub\ Desktop.app/Contents/Resources/git-lfs/bin/git-lfs

@chasescot
Copy link

Very clever and thank k8nd sir.

Sent from my Samsung Galaxy smartphone.-------- Original message --------From: 勤 notifications@github.com Date: 2016-04-28 11:04 PM (GMT-07:00) To: github/git-lfs git-lfs@noreply.github.com Subject: Re: [github/git-lfs] 'git-lfs' was not found on your path in
SourceTree (#853)
@pprochazka72 You may config SourceTree use git within it self.

Your SourceTree will not find git-lfs in your system PATH.

I use SmartGit, and I use follow command to make git-lfs available for my SmartGit. You can modify it for your SourceTree

ln /Applications/SmartGit.app/Contents/Resources/git/bin/git-lfs /Applications/GitHub\ Desktop.app/Contents/Resources/git-lfs/bin/git-lfs


You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub

@kosiara
Copy link

kosiara commented Sep 8, 2016

For SmartGit 8 and git-lfs installed via brew I used the following command to make git-lfs available to SmartGit:

ln /usr/local/bin/git-lfs /Applications/SmartGit.app/Contents/Resources/git/bin/git-lfs

@iTofu
Copy link

iTofu commented Nov 22, 2016

@chocolim Thank you it works for me!

@akapitula
Copy link

Removing file .git/hooks/pre-push solved this problem

@diophung
Copy link

installation guide is here : https://git-lfs.github.com/ . Just download and follow the instructions to install git-lfs on your local

@bobKasbi
Copy link

bobKasbi commented Mar 1, 2017

deleting: .git/hooks/pre-push solves the problem immediatly.

@rivaros
Copy link

rivaros commented Apr 10, 2017

SmartGit 8.0.5 does not have git-lfs inside.

Also it has some weird internal PATH:

/usr/local/git/libexec/git-core:/Applications/SmartGit.app/Contents/Resources:/usr/bin:/bin:/usr/sbin:/sbin

To make it see my HomeBrew git-lfs I had to run

sudo ln -s /usr/local/bin/git-lfs /usr/local/git/libexec/git-core/git-lfs

Is there any doc explaining where SmartGit searches for git-lfs provided we use externa git executable?

@vb0iko
Copy link

vb0iko commented May 19, 2017

@diophung Thank you it works for me!

@zapjonny
Copy link

Funny, for me it says "This repository is configured for Git LFS but 'git-lfs' was not found on your path. If you no longer wish to use Git LFS, remove this hook by deleting .git/hooks/post-checkout."

@thefuntastic
Copy link

thefuntastic commented Feb 6, 2018

**Don't delete: .git/hooks/pre-push **

That just turns off LFS - and will cause issues if you're submitting to a shared repository. It's much better to resolve the errors by linking LFS as other posters have outlined above. Of course if you never intended to use LFS then removing LFS hooks is reasonable.

@prashant-avalara
Copy link

execute this command
rm .git/hooks/pre-push
and try pull from remote to test

@rtmlp
Copy link

rtmlp commented Jun 11, 2019

This solved for me sudo ln -s /usr/local/bin/git-lfs /usr/local/git/libexec/git-core/git-lfs

@asgeir-s
Copy link

This solved for me sudo ln -s /usr/local/bin/git-lfs /usr/local/git/libexec/git-core/git-lfs

This returns "ln: /usr/local/git/libexec/git-core/git-lfs: No such file or directory" for me. I have no git directory in "/usr/local/git/".

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests