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: Fri, 01 May 2009 15:08:08 -0700	[thread overview]
Message-ID: <7v3abowk6v.fsf@gitster.siamese.dyndns.org> (raw)
In-Reply-To: <94a0d4530905010137h772b53f1q8af0d30400a05043@mail.gmail.com> (Felipe Contreras's message of "Fri, 1 May 2009 11:37:37 +0300")

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

>> 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.
>
> I disagree. Opening ~/.gitconfig will just open an empty file for the
> new users, afterwards they'll just scratch their heads wondering, now
> what?

Why on earth would anybody start introducing ~/.gitconfig before talking
about .git/config?

A good sequence would be:

	To start working on a tarball extract (or your uncontrolled
	project) with git, first do:

	$ git init

	Whoa.  That was fast.  Did it do anything?  Yes, it created a
	subdirectory .git that is going to store your history and other
	control information.  Right now you do not have any history (nor
	the current state for that matter) recorded in it, but it already
	has some control information.  One of the more important one is
	the per-repository configuration file.  Take a look:

	$ git config --edit

	It would show something like:

	[core]
        	...

	... explain a bit on how simple the configuration syntax is ...

        While you have it open, it would be a good idea to add this to
        introduce yourself to git:

	[user]
        	email = clueful@git.us.er
                name = My Self

	If you work in multiple projects under the same identity, you
	do not have to add user.email and user.name to each and every
	repository this way.  Instead, you can do that to your per-user
	configuration file, like:

	$ git config --global --edit

	but if you work in different projects using different mail address
	(e.g. work vs hobby projects), you would want to have this
	information per-repository.

  reply	other threads:[~2009-05-01 22:08 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             ` [PATCH 6/7] user-manual: add global config section Junio C Hamano
2009-05-01  8:37               ` Felipe Contreras
2009-05-01 22:08                 ` Junio C Hamano [this message]
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=7v3abowk6v.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).