git config 分为全局和局部git
全局:git config --glabol
局部:git config
shell
最终会生成配置文件,通常在~/.gitconfig。vim
git config --global core.fileMode git config --global core.quotepath false git config --global core.editor vim git config --global core.ignorecase false git config --global credential.helper store git config --global credential.helper wincred git config --global user.name <your name> git config --global user.email <your_email@example.com> git config --global push.default simple
key | value | 描述 |
---|---|---|
core.fileMode | true、false | 在对比文件差别时,是否检测文件权限是否改变。因为有umask的存在,可能会使remote的文件权限拉到本地时发生改变,commit时,一堆的文件须要提交,可是他们仅仅是文件权限有所不一样。 |
core.editor | 编辑器:vim,emacs | 提交时,使用的编辑器,用于编辑提交的message |
diff.tool | 比较程序:vimdiff,bc | 对比差别时用的程序 |
difftool.prompt | true、false | 启动比较工具时,是否提示 |