混帐bash更改用户名

我使用的是git bash,它试图使用我的Windows用户名来login“git push origin Dev”,但是我希望它使用不同的名称,我的用户名在远程。 我怎样才能改变这个? 谢谢

更改远程origin的configuration。 有关详细信息,请参阅git-push(1)手册页的REMOTES部分。

如果我理解了这种情况,下面的命令应该设置你想要的gitconfiguration信息。

 git config --global user.name "Your Name Comes Here" git config --global user.email [email protected] 

相反,使用git config命令将您的身份保存在configuration文件中。 $ git config user.name“Jon Loeliger”$ git config user.email“[email protected]”您也可以使用GIT_AUTHOR_NAME和GIT_AUTHOR_EMAIL环境variables来告诉Git您的姓名和电子邮件地址。 如果设置,这些variables覆盖所有configuration设置。