目录

一、git 下载

二、git 安装

(1)继续之前,请阅读以下重要信息

(2)自定义选择安装位置

(3)选择组件

(4)创建开始菜单目录

(5)选择 Git 使用的默认编辑器

(6)调整新存储库中初始分支的名称(新版  2.37.2.2 多此环节)

(7)选择 HTTPS 传输后端(新版  2.37.2.2 与下一环节顺序颠倒)

(8)配置 PATH 环境(新版  2.37.2.2 与上一环节顺序颠倒)

(9)选择 SSH 可执行文件(新版  2.37.2.2 多此环节)

(10)配置行结束转换

(11)配置终端模拟器以与 Git Bash 一起使用

(12)选择默认的行为 ‘git pull’(新版  2.37.2.2 多此环节)

(13)选择凭据助手(新版  2.37.2.2 多此环节)

(14)配置额外的选项

(15)配置实验选项(新版  2.37.2.2 多此环节)

(16)安装完成

(17)验证安装成功



一、git 下载

git 官网下载地址:https://git-scm.com

 



二、git 安装

安装步骤:

1.安装 git 时,要选择自定义安装路径

2.勾选生成 git 的桌面快捷方式

3.其他全部默认选项安装

4.验证安装成功


(1)继续之前,请阅读以下重要信息


(2)自定义选择安装位置


(3)选择组件

中文译文:
1.Additional icons:附加图标
​   On the Desktop:在桌面上

2.Windows Explorer integration Windows:资源管理器集成鼠标右键菜单
​    Git Bash Here:命令行窗口
​    Git GUI Here:可视化窗口

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

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

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

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

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


(4)创建开始菜单目录


(5)选择 Git 使用的默认编辑器

中文译文:
1.Use the Nano editor by default
默认使用 Nano 编辑器

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

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

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


(6)调整新存储库中初始分支的名称(新版  2.37.2.2 多此环节

中文译文:

1.Let Git decide:默认 Git 配置
Let Git use its default branch name (currently: "master") for the initial branchin newly created repositories. The Git project intends to change this default toa more inclusive name in the near future.

让 Git 使用它的默认分支名称 (当前:“master”) 作为初始分支新创建的存储库。Git 项目打算在不久的将来将此默认名称更改为更具包容性的名称。

2.Override the default branch name for new repositories:重写新存储库的默认分支名称
NEW! Many teams already renamed their default branches; common choices are"main", "trunk" and "development". Specify the name "git init" should use for theinitial branch:

新的!许多团队已经重新命名了它们的默认分支;常见的选择是 “main”、“trunk” 和“development”。指定初始分支应该使用的名称 “git init”
This setting does not affect existing repositories:此设置不影响现有存储库。


(7)选择 HTTPS 传输后端(新版  2.37.2.2 与下一环节顺序颠倒

中文译文:
1.Use the OpenSSL library:使用 OpenSSL 库

Server certificates will be validated using the ca-bundle.crt file.
服务器证书将使用 ca-bundle.crt 文件进行验证。

2.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 。


(8)配置 PATH 环境(新版  2.37.2.2 与上一环节顺序颠倒

中文译文:
1.Use Git from Git Bash only:仅使用 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 命令行工具。

2.Use Git from the Windows Command Prompt:使用来自命令行和第三方软件的 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。

3.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  ”。只有在了解其含义后才使用此选项。


(9)选择 SSH 可执行文件新版  2.37.2.2 多此环节

中文译文:

1.Use bundled OpenSSH:使用捆绑 OpenSSH
This uses ssh.exe that comes with Git.

它使用 Git 附带的 ssh.exe 。

2.Use external OpenSSH:使用外部 OpenSSH
NEW! This uses an external ssh.exe. Git will not install its own OpenSSH(and related) binaries but use them as found on the PATH.

新的!这使用外部 ssh.exe 。GIT 不会安装它自己的 OpenSSH (和相关的)二进制文件,而是按照路径上找到的那样使用它们。


(10)配置行结束转换

中文译文:
1.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” )

2.Checkout as-is , commit Unix-style line endings:按 as-is 签出,提交 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” )

3.Checkout as-is,commit as-is:按 as-is 签出,按 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” )


(11)配置终端模拟器以与 Git Bash 一起使用

中文译文:
1.Use MinTTY (the default terminal of MSYS2):使用 MinTTY ( MSYS 2 的默认终端)
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 中运行。

2.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 之前,其窗口不能自由调整大小,并且只允许矩形文本选择。


(12)选择默认的行为 ‘git pull’新版  2.37.2.2 多此环节

中文译文:

1.Default (fast-forward or merge) :默认(快速转发或合并)
This is the standard behavior of 'git pull ': fast-forward the current branch tothe fetched branch when possible, otherwise create a merge commit.

这是 “git pull” 的标准行为:如果可能的话,将当前分支快速转发到获取的分支,否则将创建合并提交。

2.Rebase:重基
Rebase the current branch onto the fetched branch. If there are no localcommits to rebase, this is equivalent to a fast-forward.

将当前分支重新定位到获取的分支上。如果没有要重基的本地提交,这相当于快速转发。

3.only ever fast-forward:只有永远快进
Fast-forward to the fetched branch. Fail if that is not possible.

快进到抓取的树枝上。如果这是不可能的,那就失败。


(13)选择凭据助手新版  2.37.2.2 多此环节

中文译文:

1.Git Credential Manager:GIT 凭证管理
Use the cross-platform Git Credential Manager.

使用跨平台 Git 凭据管理器。
See more information about the future of Git Credential Manager here.

请参阅有关 Git 凭据经理未来的更多信息。

2.None:无
Do not use a credential helper.

不要使用凭据助手。


(14)配置额外的选项

中文译文:
1.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”)。 这提供了显着的性能提升。

2.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 或更高版本)。

3.Enable symbolic links:启用符号链接

Enable symbolic links (requires the SeCreateSymbolicLink permission).Please note that existing repositories are unaffected by this setting.
启用符号链接(需要 SeCreateSymbolicLink 权限)。请注意,现有存储库不受此设置的影响。


(15)配置实验选项新版  2.37.2.2 多此环节

中文译文:

1.Enable experimental support for pseudo consoles:启用对伪控制台的实验支持
(NEW!) This allows running native console programs like Node or Python in aGit Bash window without using winpty, but it still has known bugs.

(新的!)这允许在 aGit Bash 窗口中运行本地控制台程序,如 Node 或 Python,而无需使用winpty,但它仍然存在已知的 bug 。

2.Enable experimental built-in file system monitor:启用实验性内置文件系统监视器
(NEW!)Automatically run a built-in file system watcher, to speed up commonoperations such as `git status`, 'git add, 'git commit', etc in worktreescontaining many files.

(新!)自动运行内置的文件系统监视程序,以加快包含多个文件的工作树中的公共操作,如“git status”、“git add”、“git COMMIT” 等。


(16)安装完成


(17)验证安装成功

Bash 命令行窗口输入以下命令查看 git 命令集和 git 版本号:

git
git --version

​​​​​​​

【Git】win 10 / win 11:git 下载、安装相关推荐

  1. 【Jenkins】win 10 / win 11:Jenkins 的下载、安装、部署(Jenkins 2.365 基于 Java 17)

    目录 一.安装 JDK 二.Jenkins 下载 三.准备服务登录凭据 四.Jenkins 安装 (1)自定义路径安装 (2)提供服务登录凭据 (3)设置端口 (4)选择 Java 主目录 (jdk ...

  2. 【Jenkins】win 10 / win 11:Jenkins 的下载、安装、部署(Jenkins 2.134 基于 Java 8)

    目录 一.Jenkins的下载 二.Jenkins的安装 三.安装后初次登录Jenkins 四.部署自动化集成环境 一.Jenkins的下载 Jenkins官网下载地址:Jenkins   点击前往下 ...

  3. 【JDK】win 10 / win 11:jdk 8 升级为 jdk 17

    目录 一.前言 二.历史版本 Java 安装 三.最新版本 Java 安装 (1)历史版本作废 (2)最新版本沿用旧版 JDK 系统环境变量 (3)JDK 17 下载 (4)JDK 17 安装 (5) ...

  4. git add 文件夹_Git的下载安装以及基本操作

    二,配置git:用户名和邮箱 在桌面右键-[Git Bash Here] 输入命令: git config --global user.name "lijiang" git con ...

  5. win 10 禁用键盘,下载vc

    1. win10 禁用笔记本键盘 sc config i8042prt start= disabled //禁用键盘 sc config i8042prt start= auto // 恢复 如果报如 ...

  6. Windows 10 解决无法完整下载安装语言包(日语输入法无法下载使用)

    最近我想在我的 Windows 10 上安装一个新的语言包,在 "设置" -> "时间和语言" -> "语言" 中,添加了新的语 ...

  7. 【抓包工具】win 10 / win 11:Charles 下载、安装、配置(快捷方式、默认端口、登录、https 证书)

    目录 一.Charles 和 Fidder 对比 二.Charles 官方下载最新版 三.Charles 安装 四.Charles 配置 (1)桌面快捷方式 (2)修改 Charles 的默认端口 ① ...

  8. 【抓包工具】win 10 / win 11:WireShark 下载、安装、使用

    目录 一.WireShark 下载 二.WireShark 安装 (1)双击运行安装程序 (2)Choose Components:选择组件 (3)Additional Tasks:附加任务 (4)C ...

  9. 【Access】win 10 / win 11:Access 下载、安装、使用教程(「管理信息系统」实践专用软件)

    目录 一.前言 二.卸载 Office 三.下载 Office Tool Plus 四.安装 Office(内含 Access) (1)启动 Office Tool Plus (2)部署 (3)安装  ...

最新文章

  1. 用createrepo配置Yum本地源
  2. 算法------设计哈希映射
  3. 深入浅出 PouchContainer 容器化业务实践 Workshop 开放报名
  4. linux bash shell之变量替换::=句法、=句法、:-句法、-句法、=?句法、?句法、:+句法、+句法
  5. 浸会大学计算机专业硕士排名2019,2019软科世界大学学术排名香港浸会大学排名第701-800...
  6. Node — 第六天(前后端分离)及(身份验证)
  7. SpringMVC注解@RequestParam全面解析____ 注解@RequestParam如何使用加与不加的区别
  8. 广东 职称英语计算机,现在评职称英语和计算机都不用考了
  9. linux进程阻塞例子,一个Linux守候进程例子
  10. nginx与IIS服务器搭建集群实现负载均衡(一)
  11. opengl 保留上一帧_历史上第一部长片动画,还真有点重口
  12. ctf攻防渗透-加密-栅栏密码
  13. Hive面试题汇总大全
  14. java面试说话技巧,Java面试题及解答技巧解析介绍
  15. 微信小程序的测试方法
  16. ITIL学习笔记——核心流程之:服务级别管理
  17. 03. Excel_公式
  18. Windows的cmd统计文件行数
  19. easyExcel导出下拉选择框,多sheet数据excle导入导出
  20. 算法_数学问题_Question10_马克思手稿中的数学(java实现)

热门文章

  1. 函数指针、函数指针数组,函数指针数组的指针
  2. Java实现对某个值加同步锁
  3. 免费加水印在线图片加水印
  4. 坦克大战敌我坦克重叠问题
  5. 腐烂国度计算机配置要求,微软《腐烂国度 2》官方配置需求公布
  6. 新买的iPhone手机不能下载App,反复弹出appid和密码输入窗口
  7. 非常霸气的妈妈,写给自己的孩子的五十句话。
  8. 计算机网上阅卷的试卷扫描及图象处理对考生书写答题卷有何要求考生注意事项
  9. 大型真人秀节目:buildozer 折腾记
  10. java--18位身份证号最后一位(检验码)是怎么算出来的?