入职新的公司,用了新的电脑需要切换git到自己的账户, 切换帐号其实很简单, 如果你不知道现在本地Git用的帐号是什么,你可以输入
git config user.name
查看用户名
git config user.email
查看用户邮箱
修改用户名和邮箱的命令
git config --global user.name "Your_username"
git config --global user.email "Your_email"
有一点要注意, user.name/email后面千万记得加空格,否则你就是提交了,Git也不会提醒你配置出错
扫码关注腾讯云开发者
领取腾讯云代金券
Copyright © 2013 - 2025 Tencent Cloud. All Rights Reserved. 腾讯云 版权所有
深圳市腾讯计算机系统有限公司 ICP备案/许可证号:粤B2-20090059 深公网安备号 44030502008569
腾讯云计算(北京)有限责任公司 京ICP证150476号 | 京ICP备11018762号 | 京公网安备号11010802020287
Copyright © 2013 - 2025 Tencent Cloud.
All Rights Reserved. 腾讯云 版权所有