黑猴子的家:Git 安装

1、Git 网址

https://gitforwindows.org/

黑猴子的家:Git 安装

2、Git 安装包下载

Git-2.9.2-64-bit.exe
黑猴子的家:Git 安装

2、开始安装 Git

(1)Next

黑猴子的家:Git 安装

(2)Browse –> Next

黑猴子的家:Git 安装

(3)Next

黑猴子的家:Git 安装

(4)Browse –> Next

黑猴子的家:Git 安装

(5)Use Git from Git Bash only

黑猴子的家:Git 安装

选择Git命令的执行环境,这里推荐选择第一个,就是单独用户Git自己的命令行窗口。
不推荐和windows的命令行窗口混用。

(6)Checkout Windows-style,commit Unix-style line endings

黑猴子的家:Git 安装

在“Configuring the line ending conversions”选项中;
第一个选项:如果是跨平台项目,在windows系统安装,选择;
第二个选项:如果是跨平台项目,在Unix系统安装,选择;
第三个选项:非跨平台项目,选择。

(7)Use MinTTY (the default terminal of MSYS2)

黑猴子的家:Git 安装

(8)Enable file system caching

黑猴子的家:Git 安装

在“Configuring extra”选项中,
默认开启文件缓存即可(推荐)

(9)View Releases Notes

黑猴子的家:Git 安装

(10)窗口测试

黑猴子的家:Git 安装

(11)配置Git

安装完成后,在任意的文件目录下,右键都可以开打Git的命令行窗口。
安装完成后,还需要最后一步设置,在命令行输入如下

黑猴子的家:Git 安装
[email protected] MINGW64 /e
$ git init

[email protected] MINGW64 /e
$ git config --global user.name "liufengji"

[email protected] MINGW64 /e
$ git config --global user.email "[email protected]"
Git是分布式版本控制系统,所以需要填写用户名和邮箱作为一个标识。
C:\Users\admin路径下的.gitconfig文件里面可以看到
- -global 表示全局属性,所有的git项目都会共用属性