'Git clone git-lfs filter-process: git-lfs: command not found
I'm trying to clone a project from git by this:
git clone link
And got this message
remote: Enumerating objects: 24533, done.
remote: Counting objects: 100% (24533/24533), done.
remote: Compressing objects: 100% (5045/5045), done.
remote: Total 24533 (delta 15448), reused 24389 (delta 15306), pack-reused 0
Receiving objects: 100% (24533/24533), 75.12 MiB | 10.96 MiB/s, done.
Resolving deltas: 100% (15448/15448), done.
git-lfs filter-process: git-lfs: command not found
fatal: the remote end hung up unexpectedly
warning: Clone succeeded, but checkout failed.
You can inspect what was checked out with 'git status'
and retry with 'git restore --source=HEAD :/'
I've been searching around and tried:
git config --system core.longpaths true
but it doensn't work and my disk is plenty free
Solution 1:[1]
This is a simple one. Check the documentation to the installation types based on your OS. For linux, just follow these commands:
Download and install the Git command line extension. Once downloaded and installed, set up Git LFS for your user account by running:
git lfs install
You only need to run this once per user account.
In each Git repository where you want to use Git LFS, select the file types you'd like Git LFS to manage (or directly edit your .gitattributes). You can configure additional file extensions at anytime.
git lfs track "*.psd"
Now make sure .gitattributes is tracked:
git add .gitattributes
Note that defining the file types Git LFS should track will not, by itself, convert any pre-existing files to Git LFS, such as files on other branches or in your prior commit history. To do that, use the git lfs migrate[1] command, which has a range of options designed to suit various potential use cases.
There is no step three. Just commit and push to GitHub as you normally would; for instance, if your current branch is named main:
git add file.psd git commit -m "Add design file" git push origin main
References: https://git-lfs.github.com/
Solution 2:[2]
If you are on Mac, run:
brew install git-lfs
git lfs install
Solution 3:[3]
TL;DR
Perhaps git didn't get linked to git-lfs on the machine. Try linking it:
ln -s "$(which git-lfs)" "$(git --exec-path)/git-lfs"
Explanation
Although it said something missing, git-lfs could actually be installed on the machine but git just didn't find it in its search path. Therefore, we create a symbolic file in its search path:
$(git --exec-path)/git-lfs
linking to the typically installed one on the machine:
which git-lfs
Solution 4:[4]
Encountered the same problem, the answer by Teodoriko did not work for me got the result:
git: 'lfs' is not a git command. See 'git --help'.
What worked for me was to install the dependency with:
sudo apt install git-lfs
My git version 2.27.0
Solution 5:[5]
You might try to push a repository that contains files of huge size. So, We have to install git-lfs in that case.
For Windows:
Download git-lfs from the official site (download) and install it in your machine.
Then set up Git LFS for your user account by running the following command in your terminal:
git lfs install
For Mac:
Run the following commands in your terminal.
brew install git-lfs git lfs install
For Ubuntu:
Run the following commands in your terminal.
sudo apt install git-lfs git lfs install
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|---|
| Solution 1 | Teodorico Maziviala |
| Solution 2 | Lukasz Czerwinski |
| Solution 3 | |
| Solution 4 | James Dube |
| Solution 5 | Codemaker |
