差异 b/w 帐户与 Windows 客户的 GitHub 部分中的 "Configure git" 部分
Difference b/w Account vs "Configure git" section in the GitHub for Windows client
(免责声明:我是 Git 和 GitHub 的新手。)
我是 运行 2.11.0.5 版本的 GitHub Windows 客户端。在“选项”页面(请参见下文)中,有帐户信息(我的 GitHub 帐户),在其下方,有包含全名和电子邮件字段的 "Configure git" 部分。
如果帐户信息已经指定,为什么还需要 "Configure git" 部分? (我试图设想可能活跃的一对多使用场景,但不知道 GitHub,我不明白这一点。)
“这将更改您的全局 gitconfig”的注释是一个强烈的提示:这些字段用于设置 user.name
和 user.email
,它们是每个最小 git 配置。
客户端 可以 从您的 GitHub 帐户信息中推断出初始值,但应用程序的作者显然决定最好直接询问您。
Your Identity
The first thing you should do when you install Git is to set your user name and e-mail address. This is important because every Git commit uses this information, and it’s immutably baked into the commits you start creating:
$ git config --global user.name "John Doe"
$ git config --global user.email johndoe@example.com
Again, you need to do this only once if you pass the --global
option, because then Git will always use that information for anything you do on that system. If you want to override this with a different name or e-mail address for specific projects, you can run the command without the --global option
when you're in that project.
Many of the GUI tools will help you do this when you first run them.
http://git-scm.com/book/en/v2/Getting-Started-First-Time-Git-Setup#Your-Identity
git 用户和电子邮件与 Github 帐户完全不同。
基本上,Git 会在每次提交时标记使用 git config
命令设置的用户和电子邮件(红色圆圈中的字段用于该命令)。 Git 不知道密码。
另一方面,Github 帐户只是一种访问 Github 上的远程存储库的安全方式(使用用户名和密码)。
(免责声明:我是 Git 和 GitHub 的新手。)
我是 运行 2.11.0.5 版本的 GitHub Windows 客户端。在“选项”页面(请参见下文)中,有帐户信息(我的 GitHub 帐户),在其下方,有包含全名和电子邮件字段的 "Configure git" 部分。
如果帐户信息已经指定,为什么还需要 "Configure git" 部分? (我试图设想可能活跃的一对多使用场景,但不知道 GitHub,我不明白这一点。)
“这将更改您的全局 gitconfig”的注释是一个强烈的提示:这些字段用于设置 user.name
和 user.email
,它们是每个最小 git 配置。
客户端 可以 从您的 GitHub 帐户信息中推断出初始值,但应用程序的作者显然决定最好直接询问您。
Your Identity
The first thing you should do when you install Git is to set your user name and e-mail address. This is important because every Git commit uses this information, and it’s immutably baked into the commits you start creating:
$ git config --global user.name "John Doe" $ git config --global user.email johndoe@example.com
Again, you need to do this only once if you pass the
--global
option, because then Git will always use that information for anything you do on that system. If you want to override this with a different name or e-mail address for specific projects, you can run the command without the--global option
when you're in that project.Many of the GUI tools will help you do this when you first run them.
http://git-scm.com/book/en/v2/Getting-Started-First-Time-Git-Setup#Your-Identity
git 用户和电子邮件与 Github 帐户完全不同。
基本上,Git 会在每次提交时标记使用 git config
命令设置的用户和电子邮件(红色圆圈中的字段用于该命令)。 Git 不知道密码。
另一方面,Github 帐户只是一种访问 Github 上的远程存储库的安全方式(使用用户名和密码)。