From 483bc4f045881b998512ae814d6cf44d0c0cb493 Mon Sep 17 00:00:00 2001 From: Jonathan Nieder Date: Mon, 30 Jun 2008 13:56:34 -0500 Subject: Documentation formatting and cleanup Following what appears to be the predominant style, format names of commands and commandlines both as `teletype text`. While we're at it, add articles ("a" and "the") in some places, italicize the name of the command in the manual page synopsis line, and add a comma or two where it seems appropriate. Signed-off-by: Jonathan Nieder Signed-off-by: Junio C Hamano --- Documentation/gittutorial-2.txt | 28 ++++++++++++++-------------- 1 file changed, 14 insertions(+), 14 deletions(-) (limited to 'Documentation/gittutorial-2.txt') diff --git a/Documentation/gittutorial-2.txt b/Documentation/gittutorial-2.txt index f2624aa22b..6c93445cc1 100644 --- a/Documentation/gittutorial-2.txt +++ b/Documentation/gittutorial-2.txt @@ -54,7 +54,7 @@ following the example above generates a different SHA1 hash than the one shown above because the commit object records the time when it was created and the name of the person performing the commit. -We can ask git about this particular object with the cat-file +We can ask git about this particular object with the `cat-file` command. Don't copy the 40 hex digits from this example but use those from your own version. Note that you can shorten it to only a few characters to save yourself typing all 40 hex digits: @@ -212,8 +212,8 @@ designate such an argument. The index file -------------- -The primary tool we've been using to create commits is "git-commit --a", which creates a commit including every change you've made to +The primary tool we've been using to create commits is `git-commit +-a`, which creates a commit including every change you've made to your working tree. But what if you want to commit changes only to certain files? Or only certain changes to certain files? @@ -255,7 +255,7 @@ index a042389..513feba 100644 +hello world, again ------------------------------------------------ -So "git-diff" is comparing against something other than the head. +So `git-diff` is comparing against something other than the head. The thing that it's comparing against is actually the index file, which is stored in .git/index in a binary format, but whose contents we can examine with ls-files: @@ -270,9 +270,9 @@ hello world! hello world, again ------------------------------------------------ -So what our "git-add" did was store a new blob and then put +So what our `git-add` did was store a new blob and then put a reference to it in the index file. If we modify the file again, -we'll see that the new modifications are reflected in the "git-diff" +we'll see that the new modifications are reflected in the `git-diff` output: ------------------------------------------------ @@ -287,7 +287,7 @@ index 513feba..ba3da7b 100644 +again? ------------------------------------------------ -With the right arguments, git-diff can also show us the difference +With the right arguments, `git-diff` can also show us the difference between the working directory and the last commit, or between the index and the last commit: @@ -311,8 +311,8 @@ index a042389..513feba 100644 +hello world, again ------------------------------------------------ -At any time, we can create a new commit using "git-commit" (without -the -a option), and verify that the state committed only includes the +At any time, we can create a new commit using `git-commit` (without +the "-a" option), and verify that the state committed only includes the changes stored in the index file, not the additional change that is still only in our working tree: @@ -329,11 +329,11 @@ index 513feba..ba3da7b 100644 +again? ------------------------------------------------ -So by default "git-commit" uses the index to create the commit, not -the working tree; the -a option to commit tells it to first update +So by default `git-commit` uses the index to create the commit, not +the working tree; the "-a" option to commit tells it to first update the index with all changes in the working tree. -Finally, it's worth looking at the effect of "git-add" on the index +Finally, it's worth looking at the effect of `git-add` on the index file: ------------------------------------------------ @@ -341,7 +341,7 @@ $ echo "goodbye, world" >closing.txt $ git add closing.txt ------------------------------------------------ -The effect of the "git-add" was to add one entry to the index file: +The effect of the `git-add` was to add one entry to the index file: ------------------------------------------------ $ git ls-files --stage @@ -382,7 +382,7 @@ it is marked "changed but not updated". At this point, running "git commit" would create a commit that added closing.txt (with its new contents), but that didn't modify file.txt. -Also, note that a bare "git diff" shows the changes to file.txt, but +Also, note that a bare `git diff` shows the changes to file.txt, but not the addition of closing.txt, because the version of closing.txt in the index file is identical to the one in the working directory. -- cgit v1.2.1