git/list[1] front-page[2] threads[3] people[4] search[5] about
 

Re: [PATCH] user-manual: Use "git config --global" instead of editing ~/.gitconfig

From
JHJan Hudec <bulb@ucw.cz>
Date
May 11, 2007, 20:23 UTC
Message-ID
<20070511202343.GB13880@efreet.light.src>
In-Reply-To
<20070511034653.GB26896@fieldses.org>
On Thu, May 10, 2007 at 23:46:53 -0400, J. Bruce Fields wrote:
Show 6 quoted lines
> On Fri, May 11, 2007 at 01:00:45AM +0200, Petr Baudis wrote:
> > However, in that case I think this is not the good point to show
> > ~/.gitconfig. Your goal at that point should be to get the user able
> > to commit as simply as possible,
> 
> Sure.

I would vote for telling users both ways to do it on that spot. Something along the lines:

    git-config --global user.email ...
    git-config --global user.name ...
    Alternatively, you can edit ~/.gitconfig and add the following:
    {{{
    [user]
    email = ...
    name = ...
    }}}

I don't like the current description with cat or echo or what it is though. It requires more thinking than necessary and especially as the mingw port progresses there will be more Windows users to whom this will be totaly confusing.

Show 19 quoted lines
> > and having to manually edit some config file is unnecessary hassle
> > when you can just use these two simple commands;
> 
> I don't get it; why are the two commands "simple", and editing a file a
> "hassle"?  In terms of, say, time required, or number of keystrokes, I
> suspect the two are about the same.  And it seems to me that:
> 
> 	- As users of a tool designed mainly to track changes to text
> 	  files, git users are likely to be pretty proficient at editing
> 	  text files.
> 	- People also need to be able to view the configuration and
> 	  change it.  If they make a typo on the first try, they may
> 	  need to do this sooner rather than later.  With a config file,
> 	  this is trivial.  With git-config, you have to learn at least
> 	  one new thing (how to query values).
> 	- The config file is easier to read than the git-config output.
> 	- You're going to have to edit some text anyway to plug your
> 	  name in, so we can't make this a pure cut-n-paste from the
> 	  docs.

Well, I would not say editing the difference is that big, but I do think it's easier to call two commands. Maybe it's psychological "I have to write something to get it working", even though it's actually less keystrokes than calling the commands.

-- 
						 Jan 'Bulb' Hudec <bulb@ucw.cz>
Previous: Nicolas PitreNext: Junio C Hamano
Message 8 of 9 in “user-manual: Use "git config --global" instead of editing ~/.gitconfig”
  1. user-manual: Use "git config --global" instead of editing ~/.gitconfigJohan Herland, May 10, 2007
  2. J. Bruce FieldsMay 10, 2007
  3. Johan HerlandMay 10, 2007
  4. Petr BaudisMay 10, 2007
  5. J. Bruce FieldsMay 11, 2007
  6. Junio C HamanoMay 11, 2007
  7. Nicolas PitreMay 11, 2007
  8. Jan HudecMay 11, 2007
  9. Junio C HamanoMay 10, 2007

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.