我的 Git Pull/Push 来自不同帐户的记录

My Git Pull/Push records from different account

如何在 pulling/pushing 期间更改 git 中的帐户?

每当 pull/push 时,我都会在我的终端中使用 git bash。之后它在我们的回购 activity 上显示我 PUSHED 作为不同的人。

这是一个示例:'name-of-other-account-here' 推送到分支 master

应该是:'my-account-here' 推送到分支 master

git config 中更改您的 user/email

# Change just for a single repo. Go into the repo.
$ git config --local user.name <your-name>
$ git config --local user.email <your-email>

# Or, change globally (for all repos)
$ git config --global user.name <your-name>
$ git config --global user.email <your-email>

$ git config --list       # check 'user.name' and 'user.email'