daG*_*daG 2 git github-for-mac gitlab
我最近重新安装了 GitHub Desktop(我使用的 Git 客户端),现在我对 GitLab 项目所做的所有提交都显示在用户名“[我的 mac 用户名]@[我的计算机名称]。[我的路由器名称]”中,而不是我在 GitLab 安装中的用户名。
我做错了什么?我怎样才能解决这个问题?
Git 确实在您的计算机上完全本地提交,您推送这些提交的站点只是读取它们。因此,您的 Gitlab 帐户与您提交的身份无关。这对于谁在何时做什么的完整性至关重要。
您得到的是 Git 的默认用户名。Git 命令行客户端通常会向您发出警告和说明:
$ git commit
[master (root-commit) cc46c07] Foo
Committer: Michael Schwern <schwern@Windhund.local>
Your name and email address were configured automatically based
on your username and hostname. Please check that they are accurate.
You can suppress this message by setting them explicitly:
git config --global user.name "Your Name"
git config --global user.email you@example.com
After doing this, you may fix the identity used for this commit with:
git commit --amend --reset-author
1 file changed, 0 insertions(+), 0 deletions(-)
create mode 100644 bar
Run Code Online (Sandbox Code Playgroud)
Github Desktop 可能有自己的配置。它将使用您的Github身份,而不是您的 Gitlab。确保您已在“首选项”->“帐户”中登录。另请检查“首选项”->“高级”并确保您的 Git 配置身份正确。
| 归档时间: |
|
| 查看次数: |
2290 次 |
| 最近记录: |