2.3 安装与初始配置:给你的 Git 烙上身份

安装好 Git 后的第一件事,是告诉世界你是谁。这点对多人协作至关重要,每一条提交记录都会刻上你的名字。

bash
复制代码
git config --global user.name "你的名字或花名"
git config --global user.email "你的邮箱@example.com"

你还可以让你的命令行更漂亮,并解决那个烦人的 Windows 换行符警告:

bash
复制代码
git config --global color.ui auto
git config --global core.autocrlf true