安装 Git
Linux 二进制包安装
- Debian/Ubuntu
$ sudo apt install git
- Gentoo
$ sudo emerge dev-util/git
- Fedora/CentOS
# up to Fedora 21
$ sudo yum install git
# Fedora 22 and later
$ dnf install git
- Arch Linux
$ pacman -S git
Linux 源码包安装
- 获取源码 https://mirrors.edge.kernel.org/pub/software/scm/git/
- 下载
wget
orcurl
- 解压
tar -zxvf git.tar.gz
- 切换目录
cd ./git
- 源码安装流程
$ cd ./git
# 个人使用默认安装位置
$ ./configure
# 共用指定安装位置
$ ./configure --prefix=/usr/local
$ make all
$ make install
Windows 安装 Git
- 获取安装包 https://git-scm.com/downloads
- Windows 软件安装流程
- 关闭 Windows 系统下的 autocrlf:
git config --global core.autocrlf false

更多精彩