Changing the username and password on git is actually very simple and only requires two steps. Next, please follow the instructions below:
Open git:
//输入可以看到自己的邮箱和用户名
git config --list
//使用这行命令修改你的邮箱
git config --global --replace-all user.email “你的邮箱”
//使用这行命令修改你的用户名
git config --global --replace-all user.name “你的用户名”
//最后
git config --list
Verify whether the modification is successful as follows: