git多个用户设置

git设置

git多个用户设置

$ git config --global user.name "your name"
$ git config --global user.email "your eamil eddress"
......

可能你已经注意到了,以上代码可以进行全局设置(global)。
但是,有的时候针对不同的项目要设置不同的作者或者邮箱,这时应当把 global 换成 local ,即可为不同的项目设置定制的用户名及邮箱!

更改编辑器

$ git config --global core.editor Atom

Atom换成你想要的编辑器即可。

设置缩写

例子:

$ git config --global alias.co checkout
$ git config --global alias.p push

alias.后面的是你想要设置的缩写,
之后输入缩写所替代的原来的命令。

其它设置

图形界面工具

git官网可以下载多种git图形界面工具,例如 github 的 github desktop 。
(https://git-scm.com/downloads/guis)

设置文件保存位置

所有Git相关的设置都默认保存在自己账号下的.gitconfig 文件中,可以直接打开修改,也有一样的效果。

Guess you like

Origin blog.csdn.net/qq_46590483/article/details/108908246