团队开发的时候常要用到git来对代码进行管理,平时开发的时候也需要使用git来做一些事情,如给vue项目进行代码编译等等。

那下面我们开始

一、安装和配置环境

  首先下载git安装包(去官网下载,https://gitforwindows.org/ 我现在用的是2.17版本的,如果是新版本可能会有部分不同),然后双击安装包打开

  

点击 next 下一步 , 选择安装位置

  

继续点击next 下一步,选择组件

  

 下面是每个选项的意思:

  Additional icons 附加图标 (​ On the Desktop 在桌面上)

  Windows Explorer integration  电脑系统的资源管理器集成鼠标右键菜单  Git Bash Here  Git GUI Here  (一般这个都选择添加上,因为方便)

  Git LFS (Large File Support)  大文件支持

  Associate .git* configuration files with the default text editor  将 .git 配置文件与默认文本编辑器相关联

  Associate .sh files to be run with Bash  将.sh文件关联到Bash运行

  Use a TrueType font in all console windows  在所有控制台窗口中使用TrueType字体

  Check daily for Git for Windows updates  每天检查Git是否有Windows更新

选择完之后点击next下一步,创建开始菜单目录

  

然后点击next下一步,选择Git使用的默认编辑器(一般使用图中这个选项,使用vim编辑器)

  

  里面的选项的意思(一般使用第二个,即 vim编辑器):

   Use the Nano editor by default   默认使用 Nano 编辑器

  Use Vim (The ubiquitous text editor) as Git's default editor  使用 Vim 作为 Git 的默认编辑器

  Use Notepad++ as Git's default editor  使用 Notepad++ 作为 Git 的默认编辑器

    Use Visual Studio Code as Git's default editor  使用 Visual Studio Code 作为 Git 的默认编辑器

选择完之后点击next,下一步 ,配置PATH环境

  

  这里每个选项的意思:

  Use Git from Git Bash only

  仅从Git Bash使用Git

  This is the safest choice as your PATH will not be modified at all.You will only be able to use the Git command line tools form Git Bash.

  这是最安全的选择,因为您的PATH根本不会被修改。您只能使用 Git Bash 的 Git 命令行工具。

  

  Use Git from the Windows Command Prompt 

  从Windows命令提示符使用Git 

  This option is considered safe as it only adds some minimal Git wrappers to your PATH to avoid cluttering your environment with optional Unix tools . You will be able to use Git from both Git Bash and the Windows Command Prompt.

  这个选项被认为是安全的,因为它只向PATH添加一些最小的 Git包,以避免使用可选的Unix工具混淆环境。 您将能够从 Git Bash 和 Windows 命令提示符中使用 Git。

  

  Use Git and optional Unix tools from the Windows Command Prompt

  从Windows命令提示符使用Git和可选的Unix工具

  Both Git and the optional Unix tools will be added to you PATH

  Git和可选的Unix工具都将添加到您计算机的 PATH 中

  Warning:This will override Windows tools like "find and sort".Only use this option if you understand the implications.

  警告:这将覆盖Windows工具,如 “ find 和 sort ”。只有在了解其含义后才使用此选项。

  一般情况下选择中间那项

选择完成之后,点击next进入下一步, 选择HTTPS传输后端 (按图中的选择就可以)

  

  选项目意思:

  Use the OpenSSL library

  使用 OpenSSL 库

  Server certificates will be validated using the ca-bundle.crt file.

  服务器证书将使用ca-bundle.crt文件进行验证。

  

  Use the native Windows Secure Channel library

  使用本地 Windows 安全通道库 

  Server certificates will be validated using Windows Certificate Stores.This option also allows you to use your company's internal Root CA certificates distributed e.g. via Active Directory Domain Services.

  服务器证书将使用Windows证书存储验证。此选项还允许您使用公司的内部根CA证书,例如, 通过Active Directory Domain Services 。

选择完成之后点击next ,进入下一步 ,配置行结束转换(按图中选择)

  

  选项意思:

  Checkout Windows-style,commit Unix-style line endings

  签出Windows风格,提交Unix风格的行尾  

  Git will convert LF to CRLF when checking out text files.When committing text files,CRLF will be converted to LF .For cross-pltform projects,this is the recommended setting on Windows ("core.autocrlf" is set to "true")

  在检出文本文件时,Git会将LF转换为CRLF。当提交文本文件时,CRLF将转换为LF。 对于跨平台项目,这是Windows上推荐的设置(“core.autocrlf”设置为“true”)

  Checkout as-is , commit Unix-style line endings 

  按原样签出,提交Unix样式的行尾

  Git will not perform any conversion when checking out text files. When committing text files, CRLF will be converted to LF. For cross-platform projects,this is the recommended setting on Unix ("core.autocrlf" is set to "input")
  在检出文本文件时,Git不会执行任何转换。 提交文本文件时,CRLF将转换为LF。 对于跨平台项目,这是Unix上的推荐设置 (“core.autocrlf”设置为“input”)

  Checkout as-is,commit as-is、

  按原样签出,按原样提交

  Git will not perform any conversions when checking out or committing text files.Choosing this option is not recommended for cross-platform projects ("core.autocrlf"is set to "false")

  在检出或提交文本文件时,Git不会执行任何转换。对于跨平台项目,不推荐使用此选项(“core.autocrlf”设置为“false”)

选择完成之后,点击next下一步, 配置终端模拟器以与 Git Bash 一起使用 (选择和图中一样)

  

  选项意思:

  Use MinTTY (the default terminal of MSYS2) 

  使用MinTTY(MSYS2的默认终端)

  Git Bash will use MinTTY as terminal emulator,which sports a resizable window,non-rectangular selections and a Unicode font. Windows console programs (such as interactive Python) must be launched via 'winpty' to work in MinTTY.
  Git Bash将使用MinTTY作为终端模拟器,该模拟器具有可调整大小的窗口,非矩形选区和Unicode字体。 Windows控制台程序(如交互式Python)必须通过'winpty'启动才能在MinTTY中运行。

  

  Use Windows' default console window

  使用Windows的默认控制台窗口

  Git will use the default console window of Windows ("cmd.exe"),which works well with Win32 console programs such as interactive Python or node.js , but has a very limited default scroll-back,needs to be configured to use aUnicode font in order to display non-ASCII characters correctly,and prior to Windows 10 its windows was not freely resizable and it only allowed rectangular text selections.  

  Git将使用Windows的默认控制台窗口(“cmd.exe”),该窗口可以与Win32控制台程序(如交互式Python或node.js)一起使用,但默认的回滚非常有限,需要配置为使用unicode 字体以正确显示非ASCII字符,并且在Windows 10之前,其窗口不能自由调整大小,并且只允许矩形文本选择。

选择完成之后,点击next进入下一步,配置额外的选项

  

  选项意思:

  Enable file system caching

  启用文件系统缓存  

  File system data will be read in bulk and cached in memory for certain operations ("core.fscache" is set to "true"). This provides a significant performance boost.
  文件系统数据将被批量读取并缓存在内存中用于某些操作(“core.fscache”设置为“true”)。 这提供了显着的性能提升

  

  Enable Git Credential Manager

  启用Git凭证管理器  

  The Git Credential Manager for Windows provides secure Git credential storage for Windows,most notably multi-factor authentication support for Visual Studio Team Services and GitHub. (requires .NET framework v4.5.1 or or later).

  Windows的Git凭证管理器为Windows提供安全的Git凭证存储,最显着的是对Visual Studio Team Services和GitHub的多因素身份验证支持。 (需要.NET Framework v4.5.1或更高版本)。

  

  Enable symbolic links

  启用符号链接

  Enable symbolic links (requires the SeCreateSymbolicLink permission).Please note that existing repositories are unaffected by this setting.

  启用符号链接(需要SeCreateSymbolicLink权限)。请注意,现有存储库不受此设置的影响。

设置完成之后点击 Install 安装。

  

安装完成之后,里面的选项

  

  Launch Git Bash  是启动git的意思

  view Release Notes 是查看发行说明

  选不选择看你自己喜欢

  到这里就安装完成了。

git的安装教程的更多相关文章

  1. git 小乌龟安装教程

    一.windows系统安装git 首先下载git for windows客户端http://msysgit.github.io/ 安装过程没什么特别的,不停next就ok了     图太多就不继续了~ ...

  2. Git+windows安装教程(一)

    一:Git是什么? Git是目前世界上最先进的分布式版本控制系统. 二:SVN与Git的最主要的区别? SVN是集中式版本控制系统,版本库是集中放在中央服务器的,而干活的时候,用的都是自己的电脑,所以 ...

  3. git&nodejs安装教程

    git https://www.cnblogs.com/ximiaomiao/p/7140456.html nodejs https://jingyan.baidu.com/article/e7505 ...

  4. git 安装教程

    昆,简单说下安装教程1,安装Git2,安装TortoiseGit3,打开第一步安装的git工具GIT BASH

  5. Git配置安装使用教程操作github上传克隆数据

    Git是何方神圣? Git是用C语言开发的分布版本控制系统.版本控制系统可以保留一个文件集合的历史记录,并能回滚文件集合到另一个状态(历史记录状态).另一个状态可以是不同的文件,也可以是不同的文件内容 ...

  6. git\CentOS6.5中gitlab安装教程

    一.Git 起源: Git是一个开源的分布式版本控制系统,用于敏捷高效地处理任何或小或大的项目. Git 是 Linus Torvalds 为了帮助管理 Linux 内核开发而开发的一个开放源码的版本 ...

  7. Git的安装和使用教程详解

    ---恢复内容开始--- 本篇笔记聊聊Git的安装和使用教程 一.认 识 Git                                                            ...

  8. Windows系统Git安装教程(详解Git安装过程)

    Windows系统Git安装教程(详解Git安装过程)   今天更换电脑系统,需要重新安装Git,正好做个记录,希望对第一次使用的博友能有所帮助! 获取Git安装程序   到Git官网下载,网站地址: ...

  9. Git git2.8.1客户端安装教程

    Git git2.8.1客户端安装教程 一 Git介绍 git是一款免费.开源的分布式版本控制系统,用于敏捷高效地处理任何或小或大的项目. 分布式相比于集中式的最大区别在于开发者可以提交到本地,每个开 ...

随机推荐

  1. 【VS开发】static、extern分析总结

    引用请注明出处:http://blog.csdn.net/int64ago/article/details/7396325 对于写了很多小程序的人,可能static和extern都用的很少,因为sta ...

  2. 第五次java实验报告

    Java实验报告 班级 计科二班 学号 20188437 姓名 何磊 完成时间2019/10/10 评分等级 实验四 类的继承 实验目的 理解抽象类与接口的使用: 了解包的作用,掌握包的设计方法. 实 ...

  3. spring5源码分析系列(三)——IOC容器的初始化(一)

    前言: IOC容器的初始化包括BeanDefinition的Resource定位.载入.注册三个基本过程. 本文以ApplicationContext为例讲解,XmlWebApplicationCon ...

  4. [转帖]Java 8新特性探究(九)跟OOM:Permgen说再见吧

    Java 8新特性探究(九)跟OOM:Permgen说再见吧 https://my.oschina.net/benhaile/blog/214159 need study 很多开发者都在其系统中见过“ ...

  5. 从零开始,SpreadJS 新人学习笔记(第二周)

    Hello,大家好,我是Fiona.经过上周的学习,我已经初步了解了SpreadJS的目录结构,以及如何创建Spread项目到我的工程目录中.>>还不知如何开始学习SpreadJS的同学, ...

  6. TCP/IP 物理层卷二 -- 交换技术

    一.概念 交换技术是指各台主机之间.各通信设备之间或者主机和通信设备之间(简单理解:你的PC和我的PC之间.你的PC和我的路由器.路由器之间)为交换信息所采用的的数据格式和交换装置的方式. 二.交换技 ...

  7. 【C++ 补习】Copy Control

    C++ Primer 5th edition, chapter 13. The Rule of Three If a class needs a destructor, it almost surel ...

  8. C++多线程基础学习笔记(五)

    一.互斥量 1.1 互斥量的基本概念 简单来说,一个锁就是一个互斥量,既然是锁,就有两种状态:加锁和解锁,通过加锁>>>操作共享数据>>>解锁的方式,实现保护共享数 ...

  9. 使用php过滤emoji表情

    /** * 过滤字符串中表情 * @param $str string 昵称 * @return string */ public function filterEmoji($str) { $str ...

  10. python协程gevent案例:爬取斗鱼美女图片

    分析 分析网站寻找需要的网址 用谷歌浏览器摁F12打开开发者工具,然后打开斗鱼颜值分类的页面,如图: 在里面的请求中,最后发现它是以ajax加载的数据,数据格式为json,如图: 圈住的部分是我们需要 ...