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
The filter process is the part where LFS sneakily hides and retrieves the real files that Git never sees (Git sees only "pointer files" that tell the filter process where the real files are). So if the filter process is stuck, you can't get your real files.
To create a new Git LFS aware repository, you'll need to run git lfs install after you create the repository: # initialize Git $ mkdir Atlasteroids $ cd Atlasteroids $ git init Initialized empty Git repository in /Users/tpettersen/Atlasteroids/. git/ # initialize Git LFS $ git lfs install Updated pre-push hook.
I received git: 'lfs' is not a git command. See 'git --help'. I had to apt install git-lfs. feedback: for me the 'Setup git repository with git-lfs' part is visually to complex. the part 'Clone repository' is nice any simple.
Once Git LFS is installed, you can clone a Git LFS repository as normal using git clone. At the end of the cloning process Git will check out the default branch (usually master ), and any Git LFS files needed to complete the checkout process will be automatically downloaded for you.
You can tell Git LFS to ignore all LFS downloads like this: $ git lfs clone [email protected] -X "*.*" The git lfs clone command has include/exclude flags to control what's downloaded. The fetch and pull commands accept the same flags, and include info on making this configuration default if you want.
Deleting local Git LFS files You can delete files from your local Git LFS cache with the git lfs prune command: $ git lfs prune ✔ 4 local objects, 33 retained Pruning 4 files, (2.1 MB) ✔ Deleted 4 files This will delete any local Git LFS files that are considered old.
If you are on Mac, run:
brew install git-lfs
git lfs install
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
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"
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
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
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/
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With