COMMIT / 提交 · INSTALL
Git Bash 安装说明 - 安装向导各选项含义详解
安装向导七个选项页
Git for Windows 安装向导选项多但都有合理默认值,入门一路 Next 完全可行。各页要点:
- 组件选择:默认已含 Git Bash 与 GUI;「Windows Explorer integration」加右键菜单,建议保留。
- PATH 环境:三选一,默认「Git from the command line and also from 3rd-party software」最均衡——命令行可用 Git,又不覆盖系统工具。
- HTTPS 传输:默认 OpenSSL 库即可。
行尾与终端两个关键页
- 行尾转换(core.autocrlf):默认「Checkout Windows-style, commit Unix-style」适合 Windows 独立开发;跨平台协作团队常统一改「Checkout as-is」,团队规范优先。
- 终端模拟器:默认 MinTTY(即 Git Bash 窗口);选 Windows 默认控制台则行为接近 CMD。不明确就保持默认 MinTTY。
- git pull 行为与凭据管理器等后续页:默认即可,细解见使用教程。
装完验证
user@windows:~ $ git --version
git version 2.x.windows.x
user@windows:~ $ which git
/cmd/git
git version 2.x.windows.x
user@windows:~ $ which git
/cmd/git
开始菜单出现「Git Bash」与「Git CMD」两个入口:前者是本站主角(bash 环境),后者是 CMD 风格。两者共享同一套 Git 配置。