Loading

git指定仓库使用特定用户名提交

需求

使用工作电脑配置了全局git用户名和公司email
更新github个人仓库时不希望commit暴露工作邮箱和姓名

实现

对repo配置local设置,指定提交时的用户名和邮箱

git config user.name nickname
git config user.email mail@github.com

改动将被保存在.git/config[user]字段

See also

git使用指定ssh key - azureology - 博客园

posted @ 2021-11-30 22:59  azureology  阅读(976)  评论(0编辑  收藏  举报