Git on macOS
检查已有的 Git
git --versionwhich gitecho $PATHecho 'export PATH="/usr/local/bin:$PATH"' >> ~/.zshrc
source ~/.zshrc安装 Git
配置 Git
参考文献
Last updated
git --versionwhich gitecho $PATHecho 'export PATH="/usr/local/bin:$PATH"' >> ~/.zshrc
source ~/.zshrcLast updated
brew install gitsource ~/.zshrcgit --version# 设置默认用户名
git config --global user.name <name>
# 设置默认邮箱
git config --global user.email <email>
# 提高 Git 命令输出的可读性
git config --global color.ui autogit config --global --list