git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Junio C Hamano <gitster@pobox.com>
To: Felipe Contreras <felipe.contreras@gmail.com>
Cc: git@vger.kernel.org
Subject: Re: [PATCH 6/7] user-manual: add global config section
Date: Sun, 05 Apr 2009 02:47:59 -0700	[thread overview]
Message-ID: <7v7i1zv3cg.fsf@gitster.siamese.dyndns.org> (raw)
In-Reply-To: 1238837909-3060-7-git-send-email-felipe.contreras@gmail.com

Felipe Contreras <felipe.contreras@gmail.com> writes:

> Signed-off-by: Felipe Contreras <felipe.contreras@gmail.com>
> ---
>  Documentation/user-manual.txt |   30 ++++++++++++++++++++++++++++++
>  1 files changed, 30 insertions(+), 0 deletions(-)
>
> diff --git a/Documentation/user-manual.txt b/Documentation/user-manual.txt
> index 3278aa7..a3032c7 100644
> --- a/Documentation/user-manual.txt
> +++ b/Documentation/user-manual.txt
> @@ -40,6 +40,36 @@ without any explanation.
>  Finally, see <<todo>> for ways that you can help make this manual more
>  complete.

I think a "getting started" section near the beginning of the manual is a
good idea (and ll.40- is a very early part of the manual).

For that "introductory" purpose, however, I'd suggest showing how they
appear in the actual .git/config file first in the editor and then show a
way to use the "git config" command as an alternative.

> +[[getting-started]]
> +Getting started
> +=============
> +
> +Git's configuration is distributed among different locations--this manual will
> +only to deal with 'global' and 'repository' variables, where 'repository'
> +variables take precedence over 'global' ones.
> +
> +You would probably want to start setting up something useful:
> +------------------------------------------------
> +$ git config --global color.ui auto
> +------------------------------------------------
> +
> +This will make prettier the output of certain commands such as `git diff`, but
> +that's not important; what is important here is that `color.ui` has been
> +stored in the 'global' (for the user) configuration.

"(for the user)" in parentheses here is better than not saying it
anywhere, but I think you should have it in the first paragraph where you
explain there are (at least) two kinds, global vs repository, in order to
clarify what you mean by 'global' is not "system/site wide" but "in any
repository I use" upfront.

> +View and manually modify the configuration with the `--edit`
> +option (which will use '$EDITOR'):
> +------------------------------------------------
> +$ git config --global --edit
> +[color]
> +        ui = auto
> +------------------------------------------------

Copies of user manual are found quite easily (and bookmarked by many
people) on the web, and are looked at by people with not-so-bleeding-edge
version of git, so I'd rather not to give them "config --edit" this early
in the documentation.  Perhaps after at least 6 months (preferrably a
year) after a release that has the new option, we can start encouraging
it, but not before.  So I'd suggest replacing 'with the --edit ...'  with
'$HOME/.gitconfig with your favorite editor' or something like that for
now.

> +Or you can manually edit the file which is located in `~/.gitconfig`. Other
> +locations are `/etc/gitconfig` (system), and `.git/config` (repository).

IOW, have this (without "Or") at the very beginning, and then as an
alternative give "git config color.ui auto".

Thanks.

  parent reply	other threads:[~2009-04-05  9:49 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-04-04  9:38 [PATCH 0/7] user-manual: general improvements Felipe Contreras
2009-04-04  9:38 ` [PATCH 1/7] user-manual: remove some git-foo usage Felipe Contreras
2009-04-04  9:38   ` [PATCH 2/7] docbook: improve css style Felipe Contreras
     [not found]     ` <1238837909-3060-4-git-send-email-felipe.contreras@gmail.com>
2009-04-04  9:38       ` [PATCH 4/7] user-manual: use 'fast-forward' instead of 'fast forward' Felipe Contreras
2009-04-04  9:38         ` [PATCH 5/7] user-manual: use SHA-1 instead of SHA1 or sha1 Felipe Contreras
2009-04-04  9:38           ` [PATCH 6/7] user-manual: add global config section Felipe Contreras
2009-04-04  9:38             ` [PATCH 7/7] user-manual: simplify the user configuration Felipe Contreras
2009-04-05  3:36               ` Jay Soffian
2009-04-05  9:14                 ` Felipe Contreras
2009-04-05 15:11                   ` Jay Soffian
2009-04-05  9:47             ` Junio C Hamano [this message]
2009-05-01  8:37               ` [PATCH 6/7] user-manual: add global config section Felipe Contreras
2009-05-01 22:08                 ` Junio C Hamano
2009-05-01 22:51                   ` Felipe Contreras
2009-05-02  0:16                     ` Junio C Hamano
2009-04-06  8:14           ` [PATCH 5/7] user-manual: use SHA-1 instead of SHA1 or sha1 Junio C Hamano
2009-05-01  8:26             ` Felipe Contreras
2009-04-06  8:14         ` [PATCH 4/7] user-manual: use 'fast-forward' instead of 'fast forward' Junio C Hamano

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=7v7i1zv3cg.fsf@gitster.siamese.dyndns.org \
    --to=gitster@pobox.com \
    --cc=felipe.contreras@gmail.com \
    --cc=git@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).