工作生活

git的配置文件

2019-07-04  本文已影响0人  小胖_20c7
git config的配置分类:
  1 关于client方面的
  2 关于server方面的
git config相关的配置文件:
  1 system(/etc/gitconfig),系统级别
  2 global(~/.gitconfig),用户级别
  3 local(.git/config),当前仓库级别,这个是git config的缺省级别
常用的一般设置
  git config --global user.name "test"
  git config --global user.email "test@qq.com"

  git config --global commit.template ~/.gitmessage.txt

  git config --global core.pager ""(默认是less)
  git config --global core.editor vim
  git config --global core.excludesfile ~/.gitignore_global

  git config --global push.default simple(上游分支)
  git config --global push.default matching(所有同名分支)
上一篇 下一篇

猜你喜欢

热点阅读