Git--git config命令

来源:互联网 发布:剑灵捏人数据 淘宝 编辑:程序博客网 时间:2024/06/05 10:25

1.$git config –global core.editor [editorName]   配置默认文本编辑器了,当 Git 需要你输入信息时会调用它。通常默认为Vim。
2.git config –list  列出所有Git当时能找到的配置。

$ git config --listuser.name=John Doeuser.email=johndoe@example.comcolor.status=autocolor.branch=autocolor.interactive=autocolor.diff=auto...

你可能会看到重复的变量名,因为 Git 会从不同的文件中读取同一个配置(例如:/etc/gitconfig 与 ~/.gitconfig)。 这种情况下,Git 会使用它找到的每一个变量的最后一个配置。

3.$git config [key]: 检查 Git 的某一项配置

$ git config user.name  John Doe