{"thread":{"id":"43506","subject":"Re: Hyphens and hiding core commands","startedAt":"2006-11-28T05:40:32Z","lastAt":"2006-11-29T07:14:49Z","messageCount":3,"participants":["Michael S. Tsirkin","Junio C Hamano","Theodore Tso"],"isPatch":false,"patchVersion":null,"patchTotal":null},"messages":[{"id":"296551","messageId":"20061128054032.GC11122@thunk.org","threadId":"43506","inReplyTo":"7vk61gcnzl.fsf@assigned-by-dhcp.cox.net","subject":"Re: Hyphens and hiding core commands","fromName":"Theodore Tso","fromEmail":"tytso@mit.edu","sentAt":"2006-11-28T05:40:32Z","receivedAt":"2006-11-28T05:40:32Z","isPatch":false,"sender":{"key":"tytso@mit.edu","avatar":"https://avatars.githubusercontent.com/u/51416?v=4"},"body":"On Mon, Nov 27, 2006 at 06:18:54PM -0800, Junio C Hamano wrote:\n> Read what I wrote again.  You can explain it without talking\n> about index at all.  I really do not think you need to break\n> \"git commit\" nor rename \"update-index\" to \"resolve\" to explain\n> things to new people.\n\nI think you're both right, and talking past each other to a certain\nextent.  Yes, pedagogically it would be better to talk about \"git\ncommit Makefile hello.c ...\"; and \"git commit -a\" as a short-cut to\nnot have to list all of the files explicitly.\n\n> The tutorial might be better reworked not to start talking about\n> -a but start building small project from a newly created\n> hello.c, git add it, and \"git commit\" (the first commit), then\n> edit hello.c and \"git commit hello.c\" (the second commit).\n> \n> Perhaps.\n\nCarl was saying that the totorial should be changed to do this.  I\nwould change \"perhaps\" to \"DEFINITELY\".  \n\nI would go further and argue that the man page for git-commit should\nbe changed to list the:\n\n\tgit commit file ...\nand\n\tgit -a\n\nalternatives first, and then talk about the index in a subsequent\nparagraph (perhaps with a note that the first two usages are best for\nnovice users) might also be a good idea.  Yes, the man page is\nsupposed to be a reference, but some novice users do bother to try to\nlearn by reading the man page (shock!  horror!), and it might be good\nif they don't run screaming into the night.\n\nBut hey, there's room for many distributed SCM's, and we can always\nlet those users use Mercurial and be happy....  (Just know that\nproject leaders who are worried about keeping their developer base\nbroad might choose Mercurial because it has a gentler learning curve\n--- and that perhaps a few simple documentation changes plus some\nsyntatic sugar might make git much more attractive to them and to\nnovice git users.)\n\n"},{"id":"296488","messageId":"7vu00k3pao.fsf@assigned-by-dhcp.cox.net","threadId":"43506","inReplyTo":"20061128054032.GC11122@thunk.org","subject":"Re: Hyphens and hiding core commands","fromName":"Junio C Hamano","fromEmail":"junkio@cox.net","sentAt":"2006-11-28T09:15:27Z","receivedAt":"2006-11-28T09:15:27Z","isPatch":false,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"Theodore Tso <tytso@mit.edu> writes:\n\n> Carl was saying that the totorial should be changed to do this.  I\n> would change \"perhaps\" to \"DEFINITELY\".  \n\nYou are right.\n\nHow about doing something like this?  I tried to make it neutral\nto be usable whichever default we end up taking.\n\n---\n\ndiff --git a/Documentation/tutorial.txt b/Documentation/tutorial.txt\nindex 35af81a..5ddd2e9 100644\n--- a/Documentation/tutorial.txt\n+++ b/Documentation/tutorial.txt\n@@ -11,6 +11,18 @@ diff\" with:\n $ man git-diff\n ------------------------------------------------\n \n+It is a good idea to introduce yourself to git before doing any\n+operation.  The easiest way to do so is:\n+\n+------------------------------------------------\n+$ cat >~/.gitconfig\n+[user]\n+\tname = Your Name Comes Here\n+\temail = you@yourdomain.example.com\n+^D\n+------------------------------------------------\n+\n+\n Importing a new project\n -----------------------\n \n@@ -31,7 +43,8 @@ defaulting to local storage area\n \n You've now initialized the working directory--you may notice a new\n directory created, named \".git\".  Tell git that you want it to track\n-every file under the current directory with\n+every file under the current directory with (notice the dot '.'\n+that means the current directory):\n \n ------------------------------------------------\n $ git add .\n@@ -40,7 +53,7 @@ $ git add .\n Finally,\n \n ------------------------------------------------\n-$ git commit -a\n+$ git commit\n ------------------------------------------------\n \n will prompt you for a commit message, then record the current state\n@@ -55,11 +68,17 @@ $ git diff\n to review your changes.  When you're done,\n \n ------------------------------------------------\n-$ git commit -a\n+$ git commit file1 file2...\n ------------------------------------------------\n \n will again prompt your for a message describing the change, and then\n-record the new versions of the modified files.\n+record the new versions of the files you listed.  It is cumbersome\n+to list all files and you can say `-a` (which stands for 'all')\n+instead.\n+\n+------------------------------------------------\n+$ git commit -a\n+------------------------------------------------\n \n A note on commit messages: Though not required, it's a good idea to\n begin the commit message with a single short (less than 50 character)\n@@ -75,7 +94,7 @@ $ git add path/to/new/file\n ------------------------------------------------\n \n then commit as usual.  No special command is required when removing a\n-file; just remove it, then commit.\n+file; just remove it, then tell `commit` about the file as usual.\n \n At any point you can view the history of your changes using\n \n"},{"id":"295175","messageId":"20061129071449.GH5061@mellanox.co.il","threadId":"43506","inReplyTo":"7vu00k3pao.fsf@assigned-by-dhcp.cox.net","subject":"Re: Hyphens and hiding core commands","fromName":"Michael S. Tsirkin","fromEmail":"mst@mellanox.co.il","sentAt":"2006-11-29T07:14:49Z","receivedAt":"2006-11-29T07:14:49Z","isPatch":false,"sender":{"key":"mst@kernel.org","avatar":null},"body":"> +------------------------------------------------\n> +$ cat >~/.gitconfig\n> +[user]\n> +\tname = Your Name Comes Here\n> +\temail = you@yourdomain.example.com\n> +^D\n> +------------------------------------------------\n\nI used to use the ^D convention when explaining git\nto beginners and I noticed some people try to cut-and-paste it.\n\nSo the following might be a better way to put it:\n\n+$ cat <<EOF >~/.gitconfig\n+[user]\n+\tname = Your Name Comes Here\n+\temail = you@yourdomain.example.com\n+EOF\n\n-- \n"}]}