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"

原文地址:https://www.cnblogs.com/gongwangwang/p/11225936.html