asdf 安装最新 git 2.37.1

centos7.9 自带的 git 版本太旧(1.8),需要升级

安装 git 插件

asdf plugin-add git https://github.com/john-cai/asdf-git.git

安装依赖

yum install autoconf curl expat gcc make gettext libiconv openssl openssl-devel unzip zlib zlib-devel libcurl-devel curl-devel

安装 git

asdf install git 2.37.1

查看安装的版本

asdf list

设置默认版本

$ vi ~/.tool-versions
git 2.37.1

卸载 git

asdf uninstall git 2.37.1
posted @ 2022-07-13 09:50  leffss  阅读(308)  评论(0)    收藏  举报