作者:2013丶峰峰最逆天_192 | 来源:互联网 | 2023-09-15 17:29
公司项目需要使用Git作为项目的代码库管理工具。正好借此机会写个安装过程1、首先下载Git下载地址:https:git-scm.comdownloadwin当前下载版本:Git-2
公司项目需要使用Git作为项目的代码库管理工具。正好借此机会写个安装过程
1、首先下载Git
下载地址:https://git-scm.com/download/win
当前下载版本:Git-2.13.2-64-bit.exe
2、安装过程
1)双击:“Git-2.13.2-64-bit.exe”文件
![Git使用(一)安装配置过程-Win7 Git使用(一)安装配置过程-Win7](https://img1.php1.cn/3cd4a/24d65/3b4/03843418f56e960c.png)
2)选择自己安装的目录。
![Git使用(一)安装配置过程-Win7 Git使用(一)安装配置过程-Win7](https://img1.php1.cn/3cd4a/24d65/3b4/f64c49bfe9ccd661.png)
3)选择需要安装的组件,默认即可。
![Git使用(一)安装配置过程-Win7 Git使用(一)安装配置过程-Win7](https://img1.php1.cn/3cd4a/24d65/3b4/956c45f0330ea3e8.png)
4)是否添加开始菜单,默认即可。
![Git使用(一)安装配置过程-Win7 Git使用(一)安装配置过程-Win7](https://img1.php1.cn/3cd4a/24d65/3b4/a97d5293573afdae.png)
5)这个步骤最好选择第二项“Use Git from the Windows Command Prompt”, 这样在Windows的命令行cmd中也可以运行git命令了。这样会对以后的一些操作带来方便。
实际这都误伤大雅,都可以自己配置。
![Git使用(一)安装配置过程-Win7 Git使用(一)安装配置过程-Win7](https://img1.php1.cn/3cd4a/24d65/3b4/9bb951c72b69d2fe.png)
6)配置行结束标记,保持默认“Checkout Windows-style, commit Unix-style line endings”.
第一个选项:如果是跨平台项目,在windows系统安装,选择;
第二个选项:如果是跨平台项目,在Unix系统安装,选择;
第三个选项:非跨平台项目,选择。
![Git使用(一)安装配置过程-Win7 Git使用(一)安装配置过程-Win7](https://img1.php1.cn/3cd4a/24d65/3b4/b071cc99e06cb900.png)
7)在终端模拟器选择页面,默认即可,配置后Git Gash的终端比较易用。
![Git使用(一)安装配置过程-Win7 Git使用(一)安装配置过程-Win7](https://img1.php1.cn/3cd4a/24d65/3b4/f399c02fac8fd33f.png)
8)最后配置Git额外选择默认即可。然后点击“Install”开始安装
![Git使用(一)安装配置过程-Win7 Git使用(一)安装配置过程-Win7](https://img1.php1.cn/3cd4a/24d65/3b4/e87a309850e9f288.png)
9)恭喜安装完成!
![Git使用(一)安装配置过程-Win7 Git使用(一)安装配置过程-Win7](https://img1.php1.cn/3cd4a/24d65/3b4/8d3acfdaa40e7dd7.png)
3、安装Git完成之后,会在桌面创建Git Bash快捷方式,在任意目录下右击鼠标可以找打Git Bash Here的选项。
![Git使用(一)安装配置过程-Win7 Git使用(一)安装配置过程-Win7](https://img1.php1.cn/3cd4a/24d65/3b4/83cced6ac82cfe95.png)
![Git使用(一)安装配置过程-Win7 Git使用(一)安装配置过程-Win7](https://img1.php1.cn/3cd4a/24d65/3b4/ea9677ee4bb0d57c.png)
4、打开Git Bash即可使用Git。输入git会出现如图所示。
![Git使用(一)安装配置过程-Win7 Git使用(一)安装配置过程-Win7](https://img1.php1.cn/3cd4a/24d65/3b4/950db3fbc4a7e4a1.png)
到此Git的Window版本安装演示结束..
备注:
选择了第一个,如果想在cmd中使用,只需要在Path变量里追加 Git安装路径/cmd 就可以了
1)找到安装目录
![Git使用(一)安装配置过程-Win7 Git使用(一)安装配置过程-Win7](https://img1.php1.cn/3cd4a/24d65/3b4/ac345431f7c2fe2b.png)
2)添加环境变量
![Git使用(一)安装配置过程-Win7 Git使用(一)安装配置过程-Win7](https://img1.php1.cn/3cd4a/24d65/3b4/fb15a24cb54ff3f2.png)
3)cmd下面测试,输入git
![Git使用(一)安装配置过程-Win7 Git使用(一)安装配置过程-Win7](https://img1.php1.cn/3cd4a/24d65/3b4/71e198c7bd007642.png)