git 如何找到我的 GitHub 用户名,以便通过 URL 找到我?

声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow 原文地址: http://stackoverflow.com/questions/19077138/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me): StackOverFlow

提示:将鼠标放在中文语句上可以显示对应的英文。显示中英文
时间:2020-09-10 17:03:44  来源:igfitidea点击:

How to find my GitHub username so that I can be found via the URL?

gitgithub

提问by user2539745

I'm confused about my GitHub username

我对我的 GitHub 用户名感到困惑

  1. Is it the one that is being displayed on the top right corner of the window?
  2. Or is it the one I created using "git config --global user.name" from my shell?
  1. 它是显示在窗口右上角的那个吗?
  2. 还是我在 shell 中使用“git config --global user.name”创建的那个?

I need to give it in a job application form.

我需要在工作申请表中提供。

采纳答案by Idan Arye

The one displayed in the top right corner in GitHub is your GitHubusername - this is the one you use to login to GitHub when you enter the site and when you commit over HTTPS, and the one that appears in the URLs of your GitHub repositories.

GitHub 右上角显示的用户名是您的GitHub用户名 - 这是您在进入站点和通过 HTTPS 提交时用于登录GitHub 的用户名,以及出现在您的 GitHub 存储库 URL 中的用户名。

The one you create using git configis your Gitusername - this is the one that appears as the author of your commits when you do git logor git blame.

您创建的用户名git config是您的Git用户名——当您执行git loggit blame.

Since you can use Git outside of GitHub, those two usernames do not have to be the same.

由于您可以在 GitHub 之外使用 Git,因此这两个用户名不必相同。

Also, the GitHub username must be unique, but nothing forces uniqueness of Git usernames.

此外,GitHub 用户名必须是唯一的,但没有任何东西强制 Git 用户名的唯一性。