git切换账号

有的时候我们有两个甚至多个git账号(公司的git账号和自己的github),为了不混淆提交,我们需要在提交之前查看自己的git账号必要时进行切换。

查看当前git用户名: git config user.name
查看当前git邮箱: git config user.email
切换git用户名: git config --global user.name "user name"
切换git邮箱: git config --global user.email  "e-mail"

posted @ 2019-07-22 15:04  把兰舟弃了  阅读(8228)  评论(0编辑  收藏  举报