git bash 更改用户名

mik*_*628 1 bash git user-accounts

我正在使用 git bash 并尝试使用我的 Windows 用户名以“git push origin Dev”登录,但我希望它使用不同的名称,即我在遥控器上的用户名。我怎样才能改变这个?谢谢

Ign*_*ams 5

更改origin遥控器的配置。有关详细信息,请参阅手册页的REMOTES部分git-push(1)


小智 5

如果我理解这种情况,以下命令应该设置您想要的信息以进行 git 配置。

git config --global user.name "Your Name Comes Here"
git config --global user.email you@yourdomain.example.com
Run Code Online (Sandbox Code Playgroud)