Windows系统下Git安装指南(2025年6月更新)
系统要求与准备工作
Windows 10或更高版本(推荐Windows 11 22H2及以上)
至少1GB可用磁盘空间
管理员权限账户
网络连接(用于下载安装包和依赖项)
下载Git安装包
访问Git官方下载页面(https://git-scm.com/download/win)
选择适用于Windows的64位或32位安装程序(2025年最新版本为Git 2.45.x)
若企业网络受限,可下载便携版(PortableGit)
安装过程详解
运行下载的Git-X.X.X-64-bit.exe安装程序
在组件选择界面勾选以下关键选项:
- [x] Windows Explorer integration
- [x] Git Bash Here
- [x] Git GUI Here
- [x] Associate .git* files with default editor
调整PATH环境配置为"Git from the command line and also from 3rd-party software"
选择HTTPS后端为"OpenSSL library"
配置行尾转换方式为"Checkout Windows-style, commit Unix-style line endings"
终端模拟器选择"Use Windows' default console window"
安装后配置
打开Git Bash执行身份验证配置:
git config --global user.name "Your Name"
git config --global user.email "your.email@example.com"
启用凭据存储(避免重复输入密码):
git config --global credential.helper wincred
设置默认文本编辑器为VS Code:
git config --global core.editor "code --wait"
验证安装结果
检查Git版本确认安装成功:
git --version
运行系统诊断命令:
git diagnose
测试基本Git
Windows系统下Git安装指南(2025年6月更新)
系统要求与准备工作
Windows 10或更高版本(推荐Windows 11 22H2及以上)
至少1GB可用磁盘空间
管理员权限账户
网络连接(用于下载安装包和依赖项)
下载Git安装包
访问Git官方下载页面(https://git-scm.com/download/win)
选择适用于Windows的64位或32位安装程序(2025年最新版本为Git 2.45.x)
若企业网络受限,可下载便携版(PortableGit)
安装过程详解
运行下载的Git-X.X.X-64-bit.exe安装程序
在组件选择界面勾选以下关键选项:
- [x] Windows Explorer integration
- [x] Git Bash Here
- [x] Git GUI Here
- [x] Associate .git* files with default editor
调整PATH环境配置为"Git from the command line and also from 3rd-party software"
选择HTTPS后端为"OpenSSL library"
配置行尾转换方式为"Checkout Windows-style, commit Unix-style line endings"
终端模拟器选择"Use Windows' default console window"
安装后配置
打开Git Bash执行身份验证配置:
git config --global user.name "Your Name"
git config --global user.email "your.email@example.com"
启用凭据存储(避免重复输入密码):
git config --global credential.helper wincred
设置默认文本编辑器为VS Code:
git config --global core.editor "code --wait"
验证安装结果
检查Git版本确认安装成功:
git --version
运行系统诊断命令:
git diagnose
测试基本Git
430

被折叠的 条评论
为什么被折叠?



