git传输大文件时候安装git lfs install报错git: ‘lfs‘ is not a git command. See ‘git --help‘.

git传输大文件时候安装git lfs install报错git: 'lfs' is not a git command. See 'git --help'.

报错类似如下:

cobol 复制代码
git lfs install
git: 'lfs' is not a git command. See 'git --help'.

The most similar command is
	log

git lfs install

git: 'lfs' is not a git command. See 'git --help'.

The most similar command is

log

解决办法:

cobol 复制代码
yum install git-lfs
Last metadata expiration check: 0:20:34 ago on Thu 01 Feb 2024 05:13:29 AM UTC.
Dependencies resolved.
================================================================================================================================================================================================================================================================================
 Package                                                         Architecture                                                   Version                                                                 Repository                                                         Size
================================================================================================================================================================================================================================================================================
Installing:
 git-lfs                                                         x86_64                                                         2.11.0-2.el8                                                            appstream                                                         4.4 M

Transaction Summary
================================================================================================================================================================================================================================================================================
Install  1 Package

Total download size: 4.4 M
Installed size: 16 M
Is this ok [y/N]: y
Downloading Packages:
git-lfs-2.11.0-2.el8.x86_64.rpm                                                                                                                                                                                                                 198 kB/s | 4.4 MB     00:22
--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
Total                                                                                                                                                                                                                                           198 kB/s | 4.4 MB     00:22
Running transaction check
Transaction check succeeded.
Running transaction test
Transaction test succeeded.
Running transaction
  Preparing        :                                                                                                                                                                                                                                                        1/1
  Installing       : git-lfs-2.11.0-2.el8.x86_64                                                                                                                                                                                                                            1/1
warning: Unable to get systemd shutdown inhibition lock: Unit systemd-logind.service is masked.

  Running scriptlet: git-lfs-2.11.0-2.el8.x86_64                                                                                                                                                                                                                            1/1
Git LFS initialized.

  Verifying        : git-lfs-2.11.0-2.el8.x86_64                                                                                                                                                                                                                            1/1

Installed:
  git-lfs-2.11.0-2.el8.x86_64

Complete!
cobol 复制代码
git-lfs install
git lfs install
相关推荐
vibecoding日记31 分钟前
为什么我就想要「线性历史 + Signed Commits」,GitHub 却把我当猴耍 🤬🎙️
git·编程工具
十日十行1 小时前
Linux和window共享文件夹
linux
木心月转码ing9 小时前
WSL+Cpp开发环境配置
linux
程序员小崔日记11 小时前
如何将代码轻松上传到 Gitee?Git 使用全攻略!
git·gitee·上传
崔小汤呀1 天前
最全的docker安装笔记,包含CentOS和Ubuntu
linux·后端
何中应1 天前
vi编辑器使用
linux·后端·操作系统
何中应1 天前
Linux进程无法被kill
linux·后端·操作系统
何中应1 天前
rm-rf /命令操作介绍
linux·后端·操作系统
Bigger1 天前
为什么你的 Git 提交需要签名?—— Git Commit Signing 完全指南
git·开源·github