Skip to content

Commit 69e104d

Browse files
bk2204gitster
authored andcommitted
doc: provide guidance on user.name format
It's a frequent misconception that the user.name variable controls authentication in some way, and as a result, beginning users frequently attempt to change it when they're having authentication troubles. Document that the convention is that this variable represents some form of a human's personal name, although that is not required. In addition, address concerns about whether Unicode is supported. Use the term "personal name" as this is likely to draw the intended contrast, be applicable across cultures which may have different naming conventions, and be easily understandable to people who do not speak English as their first language. Indicate that "some form" is conventionally used, as people may use a nickname or preferred name instead of a full legal name. Point users who may be confused about authentication to an appropriate configuration option instead. Provide a shortened form of this information in the configuration option description. Signed-off-by: brian m. carlson <[email protected]> Signed-off-by: Junio C Hamano <[email protected]>
1 parent 813f602 commit 69e104d

File tree

2 files changed

+12
-1
lines changed

2 files changed

+12
-1
lines changed

Documentation/config/user.txt

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,12 @@ committer.email::
1313
Also, all of these can be overridden by the `GIT_AUTHOR_NAME`,
1414
`GIT_AUTHOR_EMAIL`, `GIT_COMMITTER_NAME`,
1515
`GIT_COMMITTER_EMAIL` and `EMAIL` environment variables.
16-
See linkgit:git-commit[1] for more information.
16+
+
17+
Note that the `name` forms of these variables conventionally refer to
18+
some form of a personal name. See linkgit:git-commit[1] and the
19+
environment variables section of linkgit:git[1] for more information on
20+
these settings and the `credential.username` option if you're looking
21+
for authentication credentials instead.
1722

1823
user.useConfigOnly::
1924
Instruct Git to avoid trying to guess defaults for `user.email`

Documentation/git-commit.txt

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -475,6 +475,12 @@ variables, if set:
475475

476476
(nb "<", ">" and "\n"s are stripped)
477477

478+
The author and committer names are by convention some form of a personal name
479+
(that is, the name by which other humans refer to you), although Git does not
480+
enforce or require any particular form. Arbitrary Unicode may be used, subject
481+
to the constraints listed above. This name has no effect on authentication; for
482+
that, see the `credential.username` variable in linkgit:git-config[1].
483+
478484
In case (some of) these environment variables are not set, the information
479485
is taken from the configuration items `user.name` and `user.email`, or, if not
480486
present, the environment variable EMAIL, or, if that is not set,

0 commit comments

Comments
 (0)