配置
配置文件路径¶
当前项目的Git配置一般都在./.git/config
文件里面, 全局的Git配置一般在~/.gitconfig
文件里.
命令¶
get config --list
¶
可以通过git config --list
查看当前的Git项目的配置, 如:
$ git config --list
core.repositoryformatversion=0
core.filemode=true
core.bare=false
core.logallrefupdates=true
remote.origin.url=gh2:ricolxwz/5318.git
remote.origin.fetch=+refs/heads/*:refs/remotes/origin/*
branch.master.remote=origin
branch.master.merge=refs/heads/master
get config -e <--global>
¶
可以通过get config -e <--global>
设置当前Git项目的配置或者全局配置, 如:
$ git config [--global] user.name "wenzexu"
$ git config [--global] user.email "[email protected]"
修改的是全局配置.