{"thread":{"id":"8070","subject":"[PATCH] user-manual: Use \"git config --global\" instead of editing ~/.gitconfig","startedAt":"2007-05-10T21:53:31Z","lastAt":"2007-05-11T20:23:43Z","messageCount":9,"participants":["Johan Herland","J. Bruce Fields","Junio C Hamano","Petr Baudis","Nicolas Pitre","Jan Hudec"],"isPatch":true,"patchVersion":1,"patchTotal":null},"messages":[{"id":"41778","messageId":"200705102353.31821.johan@herland.net","threadId":"8070","inReplyTo":null,"subject":"[PATCH] user-manual: Use \"git config --global\" instead of editing ~/.gitconfig","fromName":"Johan Herland","fromEmail":"johan@herland.net","sentAt":"2007-05-10T21:53:31Z","receivedAt":"2007-05-10T21:53:31Z","isPatch":true,"sender":{"key":"johan@herland.net","avatar":"https://avatars.githubusercontent.com/u/547031?v=4"},"body":"Use git-config for setting global user.name and user.email rather than\ntelling the user to edit ~/.gitconfig directly. This brings \nuser-manual.txt in line with tutorial.txt.\n\nSigned-off-by: Johan Herland <johan@herland.net>\n---\n Documentation/user-manual.txt |    7 ++-----\n 1 files changed, 2 insertions(+), 5 deletions(-)\n\ndiff --git a/Documentation/user-manual.txt \nb/Documentation/user-manual.txt\nindex 13db969..23e2f45 100644\n--- a/Documentation/user-manual.txt\n+++ b/Documentation/user-manual.txt\n@@ -158,11 +158,8 @@ Making changes\n Make sure git knows who to blame:\n \n ------------------------------------------------\n-$ cat >>~/.gitconfig <<\\EOF\n-[user]\n-\tname = Your Name Comes Here\n-\temail = you@yourdomain.example.com\n-EOF\n+$ git config --global user.name \"Your Name Comes Here\"\n+$ git config --global user.email you@yourdomain.example.com\n ------------------------------------------------\n \n Select file contents to include in the next commit, then make the\n-- \n1.5.0.7\n\n"},{"id":"41780","messageId":"20070510220253.GZ13719@fieldses.org","threadId":"8070","inReplyTo":"200705102353.31821.johan@herland.net","subject":"Re: [PATCH] user-manual: Use \"git config --global\" instead of editing ~/.gitconfig","fromName":"J. Bruce Fields","fromEmail":"bfields@fieldses.org","sentAt":"2007-05-10T22:02:53Z","receivedAt":"2007-05-10T22:02:53Z","isPatch":true,"sender":{"key":"bfields@citi.umich.edu","avatar":null},"body":"On Thu, May 10, 2007 at 11:53:31PM +0200, Johan Herland wrote:\n> Use git-config for setting global user.name and user.email rather than\n> telling the user to edit ~/.gitconfig directly. This brings \n> user-manual.txt in line with tutorial.txt.\n\nThe inconsistency is intentional.  We want users to know about\ngit-config, because it's helpful when writing scripts, and because it\nhas a useful manpage.  But we also want them to know about the\nconfig-file syntax, since most of us find reading and editing a file\nmore intuitive than running git-config.  So we use a mixture of both.\n\n--b.\n\n> Signed-off-by: Johan Herland <johan@herland.net>\n> ---\n>  Documentation/user-manual.txt |    7 ++-----\n>  1 files changed, 2 insertions(+), 5 deletions(-)\n> \n> diff --git a/Documentation/user-manual.txt \n> b/Documentation/user-manual.txt\n> index 13db969..23e2f45 100644\n> --- a/Documentation/user-manual.txt\n> +++ b/Documentation/user-manual.txt\n> @@ -158,11 +158,8 @@ Making changes\n>  Make sure git knows who to blame:\n>  \n>  ------------------------------------------------\n> -$ cat >>~/.gitconfig <<\\EOF\n> -[user]\n> -\tname = Your Name Comes Here\n> -\temail = you@yourdomain.example.com\n> -EOF\n> +$ git config --global user.name \"Your Name Comes Here\"\n> +$ git config --global user.email you@yourdomain.example.com\n>  ------------------------------------------------\n>  \n>  Select file contents to include in the next commit, then make the\n> -- \n> 1.5.0.7\n> \n"},{"id":"41782","messageId":"7v7irgibcr.fsf@assigned-by-dhcp.cox.net","threadId":"8070","inReplyTo":"200705102353.31821.johan@herland.net","subject":"Re: [PATCH] user-manual: Use \"git config --global\" instead of editing ~/.gitconfig","fromName":"Junio C Hamano","fromEmail":"junkio@cox.net","sentAt":"2007-05-10T22:04:52Z","receivedAt":"2007-05-10T22:04:52Z","isPatch":true,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"I think this was rejected before, and the reason was that the\npoint of this section is to make users aware that what novices\nmight think is internal is actually represented in a very simple\nto understand and simple to change format, and reassure people\nthat making small mistakes can be fixed with an editor.\n\nAnd I think that reasoning still stands.\n"},{"id":"41787","messageId":"200705110016.18319.johan@herland.net","threadId":"8070","inReplyTo":"20070510220253.GZ13719@fieldses.org","subject":"Re: [PATCH] user-manual: Use \"git config --global\" instead of editing ~/.gitconfig","fromName":"Johan Herland","fromEmail":"johan@herland.net","sentAt":"2007-05-10T22:16:18Z","receivedAt":"2007-05-10T22:16:18Z","isPatch":true,"sender":{"key":"johan@herland.net","avatar":"https://avatars.githubusercontent.com/u/547031?v=4"},"body":"On Friday 11 May 2007, J. Bruce Fields wrote:\n> On Thu, May 10, 2007 at 11:53:31PM +0200, Johan Herland wrote:\n> > Use git-config for setting global user.name and user.email rather than\n> > telling the user to edit ~/.gitconfig directly. This brings\n> > user-manual.txt in line with tutorial.txt.\n>\n> The inconsistency is intentional.  We want users to know about\n> git-config, because it's helpful when writing scripts, and because it\n> has a useful manpage.  But we also want them to know about the\n> config-file syntax, since most of us find reading and editing a file\n> more intuitive than running git-config.  So we use a mixture of both.\n\nI see your point, but when I look at the user manual, the only place I can \nactually find git-config used is in [[remote-branch-configuration]]. \nBesides, we also present the config-file syntax for user.{name,email} in \n[[telling-git-your-name]], so it's not like I'm remove every reference to \nthe layout of .gitconfig.\n\nMaybe we can present both versions in [[making-changes]]?\n\n\nHave fun!\n\n...Johan\n\n-- \nJohan Herland, <johan@herland.net>\nwww.herland.net\n"},{"id":"41792","messageId":"20070510230045.GF4489@pasky.or.cz","threadId":"8070","inReplyTo":"20070510220253.GZ13719@fieldses.org","subject":"Re: [PATCH] user-manual: Use \"git config --global\" instead of editing ~/.gitconfig","fromName":"Petr Baudis","fromEmail":"pasky@suse.cz","sentAt":"2007-05-10T23:00:45Z","receivedAt":"2007-05-10T23:00:45Z","isPatch":true,"sender":{"key":"pasky@ucw.cz","avatar":"https://avatars.githubusercontent.com/u/18439?v=4"},"body":"On Fri, May 11, 2007 at 12:02:53AM CEST, J. Bruce Fields wrote:\n> On Thu, May 10, 2007 at 11:53:31PM +0200, Johan Herland wrote:\n> > Use git-config for setting global user.name and user.email rather than\n> > telling the user to edit ~/.gitconfig directly. This brings \n> > user-manual.txt in line with tutorial.txt.\n> \n> The inconsistency is intentional.  We want users to know about\n> git-config, because it's helpful when writing scripts, and because it\n> has a useful manpage.  But we also want them to know about the\n> config-file syntax, since most of us find reading and editing a file\n> more intuitive than running git-config.  So we use a mixture of both.\n\nHowever, in that case I think this is not the good point to show\n~/.gitconfig. Your goal at that point should be to get the user able to\ncommit as simply as possible, and having to manually edit some config\nfile is unnecessary hassle when you can just use these two simple\ncommands; also, we use the same commands in tutorials, crash courses\netc. So I really think that consistency is better here. The more viable\nstrategy is to mention that git-config really just plays with simple\ntext files at some... later point. :-)\n\n-- \n\t\t\t\tPetr \"Pasky\" Baudis\nStuff: http://pasky.or.cz/\nEver try. Ever fail. No matter. // Try again. Fail again. Fail better.\n\t\t-- Samuel Beckett\n"},{"id":"41807","messageId":"20070511034653.GB26896@fieldses.org","threadId":"8070","inReplyTo":"20070510230045.GF4489@pasky.or.cz","subject":"Re: [PATCH] user-manual: Use \"git config --global\" instead of editing ~/.gitconfig","fromName":"J. Bruce Fields","fromEmail":"bfields@fieldses.org","sentAt":"2007-05-11T03:46:53Z","receivedAt":"2007-05-11T03:46:53Z","isPatch":true,"sender":{"key":"bfields@citi.umich.edu","avatar":null},"body":"On Fri, May 11, 2007 at 01:00:45AM +0200, Petr Baudis wrote:\n> However, in that case I think this is not the good point to show\n> ~/.gitconfig. Your goal at that point should be to get the user able\n> to commit as simply as possible,\n\nSure.\n\n> and having to manually edit some config file is unnecessary hassle\n> when you can just use these two simple commands;\n\nI don't get it; why are the two commands \"simple\", and editing a file a\n\"hassle\"?  In terms of, say, time required, or number of keystrokes, I\nsuspect the two are about the same.  And it seems to me that:\n\n\t- As users of a tool designed mainly to track changes to text\n\t  files, git users are likely to be pretty proficient at editing\n\t  text files.\n\t- People also need to be able to view the configuration and\n\t  change it.  If they make a typo on the first try, they may\n\t  need to do this sooner rather than later.  With a config file,\n\t  this is trivial.  With git-config, you have to learn at least\n\t  one new thing (how to query values).\n\t- The config file is easier to read than the git-config output.\n\t- You're going to have to edit some text anyway to plug your\n\t  name in, so we can't make this a pure cut-n-paste from the\n\t  docs.\n\n> also, we use the same commands in tutorials, crash courses etc. So I\n> really think that consistency is better here. The more viable strategy\n> is to mention that git-config really just plays with simple text files\n> at some...  later point. :-)\n\nSo while I'm not convinced of the value of consistency here, if we have\nto have consistency, I'd rather standardize on config-file-editing.\n\n--b.\n"},{"id":"41811","messageId":"7vejloezji.fsf@assigned-by-dhcp.cox.net","threadId":"8070","inReplyTo":"20070511034653.GB26896@fieldses.org","subject":"Re: [PATCH] user-manual: Use \"git config --global\" instead of editing ~/.gitconfig","fromName":"Junio C Hamano","fromEmail":"junkio@cox.net","sentAt":"2007-05-11T04:48:17Z","receivedAt":"2007-05-11T04:48:17Z","isPatch":true,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"\"J. Bruce Fields\" <bfields@fieldses.org> writes:\n\n> So while I'm not convinced of the value of consistency here, if we have\n> to have consistency, I'd rather standardize on config-file-editing.\n\nI obviously agree with everything you said.\n\nI do not think \"consistency\" should weigh too much in the\nteaching and learning process, which is what a manual is about.\nIt is beneficial to make the readers aware, early in the\nprocess, that there typically are more than one ways to do\nthings, one suitable for scripting and the other for interactive\nuse.  In the introductory part of the user-manual, I think it is\na very good idea to give a bit of glimpse of what is going on\nunder the hood, and config file is probably the easiest thing to\ngive that warm feeling of something they can understand is going\non to the readers.\n"},{"id":"41833","messageId":"alpine.LFD.0.99.0705110916580.24220@xanadu.home","threadId":"8070","inReplyTo":"20070511034653.GB26896@fieldses.org","subject":"Re: [PATCH] user-manual: Use \"git config --global\" instead of editing ~/.gitconfig","fromName":"Nicolas Pitre","fromEmail":"nico@cam.org","sentAt":"2007-05-11T13:22:34Z","receivedAt":"2007-05-11T13:22:34Z","isPatch":true,"sender":{"key":"nico@fluxnic.net","avatar":"https://avatars.githubusercontent.com/u/702790?v=4"},"body":"On Thu, 10 May 2007, J. Bruce Fields wrote:\n\n> So while I'm not convinced of the value of consistency here, if we have\n> to have consistency, I'd rather standardize on config-file-editing.\n\nWhy not simply providing both?\n\n\tYou can modify your config with the following commands:\n\n\t...\n\n\tAlternatively, you might edit your ~/.gitconfig directly as \n\twell with the following content:\n\n\t...\n\nWouldn't that be clearer?  This way there is no confusion since it is \nclear up front that both methods are equivalent, and the user can choose \nbetween them.\n\nFor one, I prefer the git-config method even if I do edit source files \nall day long.  It just seems faster to me.\n\n\nNicolas\n"},{"id":"41854","messageId":"20070511202343.GB13880@efreet.light.src","threadId":"8070","inReplyTo":"20070511034653.GB26896@fieldses.org","subject":"Re: [PATCH] user-manual: Use \"git config --global\" instead of editing ~/.gitconfig","fromName":"Jan Hudec","fromEmail":"bulb@ucw.cz","sentAt":"2007-05-11T20:23:43Z","receivedAt":"2007-05-11T20:23:43Z","isPatch":true,"sender":{"key":"bulb@ucw.cz","avatar":null},"body":"On Thu, May 10, 2007 at 23:46:53 -0400, J. Bruce Fields wrote:\n> On Fri, May 11, 2007 at 01:00:45AM +0200, Petr Baudis wrote:\n> > However, in that case I think this is not the good point to show\n> > ~/.gitconfig. Your goal at that point should be to get the user able\n> > to commit as simply as possible,\n> \n> Sure.\n\nI would vote for telling users both ways to do it on that spot.\nSomething along the lines:\n\n    git-config --global user.email ...\n    git-config --global user.name ...\n\n    Alternatively, you can edit ~/.gitconfig and add the following:\n    {{{\n    [user]\n    email = ...\n    name = ...\n    }}}\n\nI don't like the current description with cat or echo or what it is though.\nIt requires more thinking than necessary and especially as the mingw port\nprogresses there will be more Windows users to whom this will be totaly\nconfusing.\n\n> > and having to manually edit some config file is unnecessary hassle\n> > when you can just use these two simple commands;\n> \n> I don't get it; why are the two commands \"simple\", and editing a file a\n> \"hassle\"?  In terms of, say, time required, or number of keystrokes, I\n> suspect the two are about the same.  And it seems to me that:\n> \n> \t- As users of a tool designed mainly to track changes to text\n> \t  files, git users are likely to be pretty proficient at editing\n> \t  text files.\n> \t- People also need to be able to view the configuration and\n> \t  change it.  If they make a typo on the first try, they may\n> \t  need to do this sooner rather than later.  With a config file,\n> \t  this is trivial.  With git-config, you have to learn at least\n> \t  one new thing (how to query values).\n> \t- The config file is easier to read than the git-config output.\n> \t- You're going to have to edit some text anyway to plug your\n> \t  name in, so we can't make this a pure cut-n-paste from the\n> \t  docs.\n\nWell, I would not say editing the difference is that big, but I do think it's\neasier to call two commands. Maybe it's psychological \"I have to write\nsomething to get it working\", even though it's actually less keystrokes than\ncalling the commands.\n\n-- \n\t\t\t\t\t\t Jan 'Bulb' Hudec <bulb@ucw.cz>\n"}]}