您的位置:首页 > 其它

git config配置文件

2015-08-31 14:34 232 查看
1.检查你的设置(Checking Your Settings)

  如果你想检查你的设置,你可以使用 git config --list 命令来列出Git可以在该处找到的所有的设置:

  $ git config --list

  user.name=Scott Chacon

  user.email=schacon@gmail.com

  color.status=auto

  color.branch=auto

  color.interactive=auto

  color.diff=auto

2. 当你安装Git后首先要做的事情是设置你的用户名称和e-mail地址。这是非常重要的,因为每次Git提交都会使用该信息。它被永远的嵌入到了你的提交中:

  $ git config --global user.name "John Doe" (git config --global user.name 就是显示你的user.name)

  $ git config --global user.email johndoe@example.com
(git config --global user.email 就是显示你的user.email)

  重申一遍,你只需要做一次这个设置。如果你传递了 --global 选项,因为Git将总是会使用该信息来处理你在系统中所做的一切操作。如果你希望在一个特定的项目中使用不同的名称或e-mail地址,你可以在该项目中运行该命令而不要--global选项。
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: