git 安装
手把手教你安装git
Windows 下安装git
Step 1:
首先,进入git 官网,点击Downloads
进入下载界面,或者直接点击右侧下载区域

选择windows
版本

Step 2:
(如果觉得太多不想看,请按默认选项一直Next
,最后Install
也可)
下载完成后,双击exe文件安装
选择安装目录(我装在了D盘,记下自己的安装目录,配置环境变量会用到)


选择安装文件夹

默认,点击Next

第一项Additional icons 添加桌面图标
use a TrueType font in all console windows
:在所有窗口使用TrueType字体
最后的Check daily for Git for Windows updates
,每日监测更新
根据自己的需要勾选
Step 3:
点击Next
,选择编辑器

建议选择默认Vim
,继续点击Next

这里默认就好
第一个选项是只在Git Bash
命令行内使用git
命令,
意思是,这是最谨慎的选择,你的路径不会被修改,你只能在git bash
中使用git
命令行工具
第二个选项,是推荐的选项,可以在git bash
和电脑的 cmd
中使用git
命令
第三个选项,会将 Git
和可选的Unix
工具加入你的环境中,下面有一个warning
:这会覆盖查找、排序等windows工具(谨慎选择)
点击Next
*Step: 4: *
选择HTTPS传输后台

下面那个选项是使用本机的安全库,这里默认第一项,点击Next

传出Windows样式,提交Unix样式的行尾
添加时将LF装换为CRLF
提交时,CRLF 转换为LF
原样传出,提交Unix风格行尾
添加时不进行转换
提交时,CRLF 转换为LF
原样传出,按原样提交
不进行任何转换(不建议选此项)注:CRLF 和 LF 表示换行,git 通过转换来兼容不同的操作系统
默认,即可,点击Next
Step 5:
选择终端

选择使用MinTTY
伪终端或者windows 的cmd
使用MinTTY可以调节窗口大小和Unicode字体,而且个人觉得相比cmd
要方便许多,也比较美观
根据个人喜好选择
设置git pull
默认操作

- Default选项,git pull 标准操作,快速发送,或创建合并提交
- 和拉取的分支合并,如果没有,就相当于default
- 只有快进,快速获取分支,推送,如果不行就失败
建议Default
Step 6 :
接下来选择凭证管理帮手

- None 没有
- 用windows 的git凭据管理器处理
- 使用心得跨平台版本的凭据管理器
选择第二或第三项,windows 建议选择第二项
配置额外选项

- 对于某些操作,文件系统数据将批量读取并缓存到内存中,显著提高性能
- 启用符号连接(需要SeCreateSymbolicLink权限)。现有存储不会受到影响
第二个可选可不选,看自己需求
Step 7:
Install

勾选可以在git bash
中使用python
等命令,但是it still has known bugs(存在已知bug)
所以我没有勾选,最后点击Install 安装。
完成!!!
配置环境变量
打开控制面板 **或在文件管理中右击此电脑,选择属性**
控制面板 –> 系统和安全 –> 系统

选择高级系统设置,环境变量
将刚刚安装的目录路径添加到path中


最后检测是否成功:

- 本文作者: Naskete
- 本文链接: https://Naskete.github.io/2020/08/11/essay/git安装/
- 版权声明: 本博客所有文章除特别声明外,均采用 MIT 许可协议。转载请注明出处!