如下图中,将已经提交的commit中,用户名jincheng-demo,jincheng-demo01
,以及邮箱jincheng@test.com
,
修改为正确的用户名:jincheng
,正确的邮箱:jincheng_921@163.com
步骤
- 打开
git bash here
客户端 - 复制需要修改的项目的git地址
git clone --bare https://gitee.com/xxxx/test01.git(这里替换成自己的git地址)
cd test01.git (clone完成后,进入项目目录)
- 建议执行以下命令,查看当前的git提交后的用户名和邮箱
git config user.name
git config user.email
- 复制脚本,并修改成自己的信息,粘贴到
git bash here
客户端中,按enter执行
OLD_EMAIL
:原来的邮箱名称,这里我的是jincheng@test.com
CORRECT_NAME
:新的用户名称,我自己的是jincheng
CORRECT_EMAIL
:新的邮箱,jincheng_921@163.com
#!/bin/sh