安装和配置git

得到git

所有平台的安装程序和说明可在https://git-scm.com/downloads

基本配置

虽然技术上不需要安装 git 让它运行,配置 git 所以你的贡献会得到赞扬:

git config --global user.name "Your Name"
git config --global user.email you@yourdomain.example.com

备注

在这里使用与设置GitHub帐户相同的电子邮件地址,以便在以后将git连接到GitHub时省去几个步骤。

请检查:

$ git config --list
user.name=Your Name
user.email=you@yourdomain.example.com
# ...likely followed by many other configuration values

获取GitGUI(可选)

git有几个好的、免费的图形界面。即使你精通 git 在命令行中,GUI非常有用。

Mac和Windows:

Linux、Mac和Windows:

有一个更广泛的列表 git GUIs ,包括所有平台的非免费选项。