threads / patch / 34783

v2, 11 partsModernize user-manual

Subject: [PATCH v2 0/11] Modernize user-manual

## tl;dr

28 messages between Aug 27, 2013 and Aug 29, 2013. Diffs are folded; open one to read it.

replies: 27people: 4as markdown or json

Thomas Ackermann· Aug 27, 2013, 17:52 UTC · lore
Hi,
this is v2 of my patches for user-manual.txt.
Thanks to Junio, Jonathan, Martin and Philip for your comments!

I think Philips remarks should be part of a separate patch series which then also should address the current differences in layout between user-manual.html and user-manual.pdf.

Changes in v2:

[PATCH 01/13] Call it "Git User Manual" and remove reference to very old Git version -> same as v1 [PATCH 02/13] Use current "detached HEAD" message -> fixed another occurence of "(no branch)" [PATCH 03/13] Use current output for "git repack" -> add location where packfile is created [PATCH 04/13] Use "git merge" instead of "git pull ." -> reverted changes in "Getting updates with git pull" [PATCH 05/13] Fix some typos and improve wording -> better wording [PATCH 06/13] Simplify "How to make a commit" -> better wording [PATCH 07/13] Improve description in "How to merge" -> this patch was dropped [PATCH 08/13] Improve section "Manipulating branches" -> add missing case for "current" [PATCH 09/13] Improve section "Merge multiple trees" -> better wording [PATCH 10/13] Remove unnecessary historical note from "Object storage format" -> same as in v1 [PATCH 11/13] Remove obscure reference from "Examples" -> this patch was dropped [PATCH 12/13] Remove irrelevant reference from "Tying it all together" -> same as in v1 [PATCH 13/13] "git prune" is safe now -> weakend warning for "git prune"

Signed-off-by: Thomas Ackermann <th.acker@arcor.de>

--- Thomas

Thomas Ackermann· Aug 27, 2013, 17:55 UTC · re: Thomas Ackermann · lore

[PATCH 01/11] Call it "Git User Manual" and remove reference to very old Git version

Reviewed-by: Jonathan Nieder <jrnieder@gmail.com>
Signed-off-by: Thomas Ackermann <th.acker@arcor.de>
---
 Documentation/user-manual.txt | 5 ++---
 1 file changed, 2 insertions(+), 3 deletions(-)
Show changes to Documentation/user-manual.txt +2 −3
diff --git a/Documentation/user-manual.txt b/Documentation/user-manual.txt
index fe723e4..103ec9a 100644
--- a/Documentation/user-manual.txt
+++ b/Documentation/user-manual.txt
@@ -1,6 +1,5 @@
-Git User's Manual (for version 1.5.3 or newer)
-______________________________________________
-
+Git User Manual
+_______________
 
 Git is a fast distributed revision control system.
 
-- 
1.8.3.msysgit.0


---
Thomas
Junio C Hamano· Aug 27, 2013, 19:04 UTC · re: Thomas Ackermann · lore

Re: [PATCH 01/11] Call it "Git User Manual" and remove reference to very old Git version

Thomas Ackermann <th.acker@arcor.de> writes:
> Reviewed-by: Jonathan Nieder <jrnieder@gmail.com>
> Signed-off-by: Thomas Ackermann <th.acker@arcor.de>
> ---
I tend to agree with Jonathan that this should be "User's Manual".

I've tentatively queued uncontroversial bits from v1 series already on 'pu', by the way, and I do not think I have time to queue rerolls of any topic today, so please expect a longer turn-around time than usual.

Show 15 quoted lines
>  Documentation/user-manual.txt | 5 ++---
>  1 file changed, 2 insertions(+), 3 deletions(-)
>
> diff --git a/Documentation/user-manual.txt b/Documentation/user-manual.txt
> index fe723e4..103ec9a 100644
> --- a/Documentation/user-manual.txt
> +++ b/Documentation/user-manual.txt
> @@ -1,6 +1,5 @@
> -Git User's Manual (for version 1.5.3 or newer)
> -______________________________________________
> -
> +Git User Manual
> +_______________
>  
>  Git is a fast distributed revision control system.
Lars Gullik Bjønnes· Aug 27, 2013, 21:16 UTC · re: Junio C Hamano · lore

Re: [PATCH 01/11] Call it "Git User Manual" and remove reference to very old Git version

Junio C Hamano <gitster@pobox.com> writes:
| Thomas Ackermann <th.acker@arcor.de> writes:
Show 5 quoted lines
>
>> Reviewed-by: Jonathan Nieder <jrnieder@gmail.com>
>> Signed-off-by: Thomas Ackermann <th.acker@arcor.de>
>> ---
>
| I tend to agree with Jonathan that this should be "User's Manual".

Not going into which one might be more correct, but a quick google search for "User's Manual" and "User Manual" give these results:

User's Manual: 5.7M hits. User Manual: ~29M hits.

-- 
	Lgb
Junio C Hamano· Aug 29, 2013, 18:12 UTC · re: Thomas Ackermann · lore

Re: [PATCH 01/11] Call it "Git User Manual" and remove reference to very old Git version

Thomas Ackermann <th.acker@arcor.de> writes:
Show 16 quoted lines
> Reviewed-by: Jonathan Nieder <jrnieder@gmail.com>
> Signed-off-by: Thomas Ackermann <th.acker@arcor.de>
> ---
>  Documentation/user-manual.txt | 5 ++---
>  1 file changed, 2 insertions(+), 3 deletions(-)
>
> diff --git a/Documentation/user-manual.txt b/Documentation/user-manual.txt
> index fe723e4..103ec9a 100644
> --- a/Documentation/user-manual.txt
> +++ b/Documentation/user-manual.txt
> @@ -1,6 +1,5 @@
> -Git User's Manual (for version 1.5.3 or newer)
> -______________________________________________
> -
> +Git User Manual
> +_______________

The removal of the parenthesized part is good, but it should be User's Manual, I think.

Thomas Ackermann· Aug 27, 2013, 17:56 UTC · re: Thomas Ackermann · lore

[PATCH 02/11] Use current "detached HEAD" message

Signed-off-by: Thomas Ackermann <th.acker@arcor.de>
---
 Documentation/user-manual.txt | 19 +++++++++++++------
 1 file changed, 13 insertions(+), 6 deletions(-)
Show changes to Documentation/user-manual.txt +13 −6
diff --git a/Documentation/user-manual.txt b/Documentation/user-manual.txt
index 103ec9a..bdefd9a 100644
--- a/Documentation/user-manual.txt
+++ b/Documentation/user-manual.txt
@@ -312,10 +312,17 @@ referenced by a tag:
 
 ------------------------------------------------
 $ git checkout v2.6.17
-Note: moving to "v2.6.17" which isn't a local branch
-If you want to create a new branch from this checkout, you may do so
-(now or later) by using -b with the checkout command again. Example:
-  git checkout -b <new_branch_name>
+Note: checking out 'v2.6.17'.
+
+You are in 'detached HEAD' state. You can look around, make experimental
+changes and commit them, and you can discard any commits you make in this
+state without impacting any branches by performing another checkout.
+
+If you want to create a new branch to retain commits you create, you may
+do so (now or later) by using -b with the checkout command again. Example:
+
+  git checkout -b new_branch_name
+
 HEAD is now at 427abfa... Linux v2.6.17
 ------------------------------------------------
 
@@ -326,7 +333,7 @@ and git branch shows that you are no longer on a branch:
 $ cat .git/HEAD
 427abfa28afedffadfca9dd8b067eb6d36bac53f
 $ git branch
-* (no branch)
+* (detached from v2.6.17)
   master
 ------------------------------------------------
 
@@ -3639,7 +3646,7 @@ working on a branch.
 
 -------------------------------------------------
 $ git branch
-* (no branch)
+* (detached from d266b98)
   master
 -------------------------------------------------
 
-- 
1.8.3.msysgit.0


---
Thomas
Thomas Ackermann· Aug 27, 2013, 17:56 UTC · re: Thomas Ackermann · lore

[PATCH 03/11] Use current output for "git repack"

Signed-off-by: Thomas Ackermann <th.acker@arcor.de>
---
 Documentation/user-manual.txt | 16 +++++++---------
 1 file changed, 7 insertions(+), 9 deletions(-)
Show changes to Documentation/user-manual.txt +7 −9
diff --git a/Documentation/user-manual.txt b/Documentation/user-manual.txt
index bdefd9a..3f44ca0 100644
--- a/Documentation/user-manual.txt
+++ b/Documentation/user-manual.txt
@@ -3203,17 +3203,15 @@ To put the loose objects into a pack, just run git repack:
 
 ------------------------------------------------
 $ git repack
-Generating pack...
-Done counting 6020 objects.
-Deltifying 6020 objects.
- 100% (6020/6020) done
-Writing 6020 objects.
- 100% (6020/6020) done
-Total 6020, written 6020 (delta 4070), reused 0 (delta 0)
-Pack pack-3e54ad29d5b2e05838c75df582c65257b8d08e1c created.
+Counting objects: 6020, done.
+Delta compression using up to 4 threads.
+Compressing objects: 100% (6020/6020), done.
+Writing objects: 100% (6020/6020), done.
+Total 6020 (delta 4070), reused 0 (delta 0)
 ------------------------------------------------
 
-You can then run
+This creates a single "pack file" in .git/objects/pack/ 
+containing all currently unpacked objects.  You can then run
 
 ------------------------------------------------
 $ git prune
-- 
1.8.3.msysgit.0


---
Thomas
Junio C Hamano· Aug 29, 2013, 18:13 UTC · re: Thomas Ackermann · lore

Re: [PATCH 03/11] Use current output for "git repack"

Thomas Ackermann <th.acker@arcor.de> writes:
Show 34 quoted lines
> Signed-off-by: Thomas Ackermann <th.acker@arcor.de>
> ---
>  Documentation/user-manual.txt | 16 +++++++---------
>  1 file changed, 7 insertions(+), 9 deletions(-)
>
> diff --git a/Documentation/user-manual.txt b/Documentation/user-manual.txt
> index bdefd9a..3f44ca0 100644
> --- a/Documentation/user-manual.txt
> +++ b/Documentation/user-manual.txt
> @@ -3203,17 +3203,15 @@ To put the loose objects into a pack, just run git repack:
>  
>  ------------------------------------------------
>  $ git repack
> -Generating pack...
> -Done counting 6020 objects.
> -Deltifying 6020 objects.
> - 100% (6020/6020) done
> -Writing 6020 objects.
> - 100% (6020/6020) done
> -Total 6020, written 6020 (delta 4070), reused 0 (delta 0)
> -Pack pack-3e54ad29d5b2e05838c75df582c65257b8d08e1c created.
> +Counting objects: 6020, done.
> +Delta compression using up to 4 threads.
> +Compressing objects: 100% (6020/6020), done.
> +Writing objects: 100% (6020/6020), done.
> +Total 6020 (delta 4070), reused 0 (delta 0)
>  ------------------------------------------------
>  
> -You can then run
> +This creates a single "pack file" in .git/objects/pack/ 
> +containing all currently unpacked objects.  You can then run
>  
>  ------------------------------------------------
>  $ git prune
Good; thanks.
Thomas Ackermann· Aug 27, 2013, 17:58 UTC · re: Thomas Ackermann · lore

[PATCH 04/11] Use "git merge" instead of "git pull ."

"git pull ." works, but "git merge" is the recommended way for new users to do things. (The old description also should have read "The former is actually *not* very commonly used".)

Signed-off-by: Thomas Ackermann <th.acker@arcor.de>
---
 Documentation/user-manual.txt | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)
Show changes to Documentation/user-manual.txt +4 −4
diff --git a/Documentation/user-manual.txt b/Documentation/user-manual.txt
index 3f44ca0..6241a43 100644
--- a/Documentation/user-manual.txt
+++ b/Documentation/user-manual.txt
@@ -1793,7 +1793,7 @@ $ git pull . branch
 $ git merge branch
 -------------------------------------------------
 
-are roughly equivalent.  The former is actually very commonly used.
+are roughly equivalent.
 
 [[submitting-patches]]
 Submitting patches to a project
@@ -2255,11 +2255,11 @@ commit to this branch.
 $ ... patch ... test  ... commit [ ... patch ... test ... commit ]*
 -------------------------------------------------
 
-When you are happy with the state of this change, you can pull it into the
+When you are happy with the state of this change, you can merge it into the
 "test" branch in preparation to make it public:
 
 -------------------------------------------------
-$ git checkout test && git pull . speed-up-spinlocks
+$ git checkout test && git merge speed-up-spinlocks
 -------------------------------------------------
 
 It is unlikely that you would have any conflicts here ... but you might if you
@@ -2271,7 +2271,7 @@ see the value of keeping each patch (or patch series) in its own branch.  It
 means that the patches can be moved into the `release` tree in any order.
 
 -------------------------------------------------
-$ git checkout release && git pull . speed-up-spinlocks
+$ git checkout release && git merge speed-up-spinlocks
 -------------------------------------------------
 
 After a while, you will have a number of branches, and despite the
-- 
1.8.3.msysgit.0


---
Thomas
Junio C Hamano· Aug 27, 2013, 19:06 UTC · re: Thomas Ackermann · lore

Re: [PATCH 04/11] Use "git merge" instead of "git pull ."

Thomas Ackermann <th.acker@arcor.de> writes:
> "git pull ." works, but "git merge" is the recommended
> way for new users to do things. (The old description
> also should have read "The former is actually *not* very
> commonly used".)

It does not matter that you are unaware other people use it often. I'd suggest dropping the first hunk altogether.

Jonathan Nieder· Aug 27, 2013, 19:44 UTC · re: Junio C Hamano · lore

Re: [PATCH 04/11] Use "git merge" instead of "git pull ."

On Tue, Aug 27, 2013 at 12:06:33PM -0700, Junio C Hamano wrote:
Show 9 quoted lines
> Thomas Ackermann <th.acker@arcor.de> writes:
> 
> > "git pull ." works, but "git merge" is the recommended
> > way for new users to do things. (The old description
> > also should have read "The former is actually *not* very
> > commonly used".)
> 
> It does not matter that you are unaware other people use it often.
> I'd suggest dropping the first hunk altogether.

Eh, the claim "The former is actually very commonly used." is confusing on its own (even though it used to be true) and elaborating wouldn't help much with education, so the first hunk makes sense to me. But maybe it should have been done in a separate patch. ;-)

Thanks, Jonathan

Junio C Hamano· Aug 27, 2013, 20:46 UTC · re: Jonathan Nieder · lore

Re: [PATCH 04/11] Use "git merge" instead of "git pull ."

Jonathan Nieder <jrnieder@gmail.com> writes:
Show 15 quoted lines
> On Tue, Aug 27, 2013 at 12:06:33PM -0700, Junio C Hamano wrote:
>> Thomas Ackermann <th.acker@arcor.de> writes:
>> 
>> > "git pull ." works, but "git merge" is the recommended
>> > way for new users to do things. (The old description
>> > also should have read "The former is actually *not* very
>> > commonly used".)
>> 
>> It does not matter that you are unaware other people use it often.
>> I'd suggest dropping the first hunk altogether.
>
> Eh, the claim "The former is actually very commonly used." is
> confusing on its own (even though it used to be true) and elaborating
> wouldn't help much with education, so the first hunk makes sense to
> me.  But maybe it should have been done in a separate patch. ;-)

Yeah, it may make sense to replace it with something like "... and if you think about the fact that your local repository is not at all special, it makes sense that you can pull from it just like you pull from other places", without mentioning how common it is. I do agree that it is a separate topic.

Thomas Ackermann· Aug 27, 2013, 17:59 UTC · re: Thomas Ackermann · lore

[PATCH 05/11] Fix some typos and improve wording

Signed-off-by: Thomas Ackermann <th.acker@arcor.de>
---
 Documentation/user-manual.txt | 20 ++++++++++----------
 1 file changed, 10 insertions(+), 10 deletions(-)
Show changes to Documentation/user-manual.txt +10 −10
diff --git a/Documentation/user-manual.txt b/Documentation/user-manual.txt
index 6241a43..465d9cb 100644
--- a/Documentation/user-manual.txt
+++ b/Documentation/user-manual.txt
@@ -219,7 +219,7 @@ of development leading to that point.
 
 The best way to see how this works is using the linkgit:gitk[1]
 command; running gitk now on a Git repository and looking for merge
-commits will help understand how the Git organizes history.
+commits will help understand how Git organizes history.
 
 In the following, we say that commit X is "reachable" from commit Y
 if commit X is an ancestor of commit Y.  Equivalently, you could say
@@ -793,7 +793,7 @@ e05db0fd4f31dde7005f075a84f96b360d05984b
 -------------------------------------------------
 
 Or you could recall that the `...` operator selects all commits
-contained reachable from either one reference or the other but not
+reachable from either one reference or the other but not
 both; so
 
 -------------------------------------------------
@@ -820,7 +820,7 @@ You could just visually inspect the commits since e05db0fd:
 $ gitk e05db0fd..
 -------------------------------------------------
 
-Or you can use linkgit:git-name-rev[1], which will give the commit a
+or you can use linkgit:git-name-rev[1], which will give the commit a
 name based on any tag it finds pointing to one of the commit's
 descendants:
 
@@ -864,8 +864,8 @@ because it outputs only commits that are not reachable from v1.5.0-rc1.
 
 As yet another alternative, the linkgit:git-show-branch[1] command lists
 the commits reachable from its arguments with a display on the left-hand
-side that indicates which arguments that commit is reachable from.  So,
-you can run something like
+side that indicates which arguments that commit is reachable from.  
+So, if you run something like
 
 -------------------------------------------------
 $ git show-branch e05db0fd v1.5.0-rc0 v1.5.0-rc1 v1.5.0-rc2
@@ -877,15 +877,15 @@ available
 ...
 -------------------------------------------------
 
-then search for a line that looks like
+then a line like
 
 -------------------------------------------------
 + ++ [e05db0fd] Fix warnings in sha1_file.c - use C99 printf format if
 available
 -------------------------------------------------
 
-Which shows that e05db0fd is reachable from itself, from v1.5.0-rc1, and
-from v1.5.0-rc2, but not from v1.5.0-rc0.
+shows that e05db0fd is reachable from itself, from v1.5.0-rc1,
+and from v1.5.0-rc2, and not from v1.5.0-rc0.
 
 [[showing-commits-unique-to-a-branch]]
 Showing commits unique to a given branch
@@ -3542,7 +3542,7 @@ with Git 1.5.2 can look up the submodule commits in the repository and
 manually check them out; earlier versions won't recognize the submodules at
 all.
 
-To see how submodule support works, create (for example) four example
+To see how submodule support works, create four example
 repositories that can be used later as a submodule:
 
 -------------------------------------------------
@@ -3914,7 +3914,7 @@ fact that such a commit brings together ("merges") two or more
 previous states represented by other commits.
 
 In other words, while a "tree" represents a particular directory state
-of a working directory, a "commit" represents that state in "time",
+of a working directory, a "commit" represents that state in time,
 and explains how we got there.
 
 You create a commit object by giving it the tree that describes the
-- 
1.8.3.msysgit.0


---
Thomas
Junio C Hamano· Aug 27, 2013, 19:07 UTC · re: Thomas Ackermann · lore

Re: [PATCH 05/11] Fix some typos and improve wording

Thomas Ackermann <th.acker@arcor.de> writes:
Show 33 quoted lines
> Signed-off-by: Thomas Ackermann <th.acker@arcor.de>
> ---
>  Documentation/user-manual.txt | 20 ++++++++++----------
>  1 file changed, 10 insertions(+), 10 deletions(-)
>
> diff --git a/Documentation/user-manual.txt b/Documentation/user-manual.txt
> index 6241a43..465d9cb 100644
> --- a/Documentation/user-manual.txt
> +++ b/Documentation/user-manual.txt
> @@ -219,7 +219,7 @@ of development leading to that point.
>  
>  The best way to see how this works is using the linkgit:gitk[1]
>  command; running gitk now on a Git repository and looking for merge
> -commits will help understand how the Git organizes history.
> +commits will help understand how Git organizes history.
>  
>  In the following, we say that commit X is "reachable" from commit Y
>  if commit X is an ancestor of commit Y.  Equivalently, you could say
> @@ -793,7 +793,7 @@ e05db0fd4f31dde7005f075a84f96b360d05984b
>  -------------------------------------------------
>  
>  Or you could recall that the `...` operator selects all commits
> -contained reachable from either one reference or the other but not
> +reachable from either one reference or the other but not
>  both; so
>  
>  -------------------------------------------------
> @@ -820,7 +820,7 @@ You could just visually inspect the commits since e05db0fd:
>  $ gitk e05db0fd..
>  -------------------------------------------------
>  
> -Or you can use linkgit:git-name-rev[1], which will give the commit a
> +or you can use linkgit:git-name-rev[1], which will give the commit a

I think I agree with Jonathan that this reads better with "Or", not "or".

Other than that looks good to me.  Thanks.
Junio C Hamano· Aug 29, 2013, 18:16 UTC · re: Thomas Ackermann · lore

Re: [PATCH 05/11] Fix some typos and improve wording

Thomas Ackermann <th.acker@arcor.de> writes:
Show 33 quoted lines
> Signed-off-by: Thomas Ackermann <th.acker@arcor.de>
> ---
>  Documentation/user-manual.txt | 20 ++++++++++----------
>  1 file changed, 10 insertions(+), 10 deletions(-)
>
> diff --git a/Documentation/user-manual.txt b/Documentation/user-manual.txt
> index 6241a43..465d9cb 100644
> --- a/Documentation/user-manual.txt
> +++ b/Documentation/user-manual.txt
> @@ -219,7 +219,7 @@ of development leading to that point.
>  
>  The best way to see how this works is using the linkgit:gitk[1]
>  command; running gitk now on a Git repository and looking for merge
> -commits will help understand how the Git organizes history.
> +commits will help understand how Git organizes history.
>  
>  In the following, we say that commit X is "reachable" from commit Y
>  if commit X is an ancestor of commit Y.  Equivalently, you could say
> @@ -793,7 +793,7 @@ e05db0fd4f31dde7005f075a84f96b360d05984b
>  -------------------------------------------------
>  
>  Or you could recall that the `...` operator selects all commits
> -contained reachable from either one reference or the other but not
> +reachable from either one reference or the other but not
>  both; so
>  
>  -------------------------------------------------
> @@ -820,7 +820,7 @@ You could just visually inspect the commits since e05db0fd:
>  $ gitk e05db0fd..
>  -------------------------------------------------
>  
> -Or you can use linkgit:git-name-rev[1], which will give the commit a
> +or you can use linkgit:git-name-rev[1], which will give the commit a

As raised during the initial review, the previous sentence has ended and this begins a new sentence, I think, hence "Or", not "or".

Show 29 quoted lines
>  name based on any tag it finds pointing to one of the commit's
>  descendants:
>  
> @@ -864,8 +864,8 @@ because it outputs only commits that are not reachable from v1.5.0-rc1.
>  
>  As yet another alternative, the linkgit:git-show-branch[1] command lists
>  the commits reachable from its arguments with a display on the left-hand
> -side that indicates which arguments that commit is reachable from.  So,
> -you can run something like
> +side that indicates which arguments that commit is reachable from.  
> +So, if you run something like
>  -------------------------------------------------
>  $ git show-branch e05db0fd v1.5.0-rc0 v1.5.0-rc1 v1.5.0-rc2
> @@ -877,15 +877,15 @@ available
>  ...
>  -------------------------------------------------
>  
> -then search for a line that looks like
> +then a line like
>  
>  -------------------------------------------------
>  + ++ [e05db0fd] Fix warnings in sha1_file.c - use C99 printf format if
>  available
>  -------------------------------------------------
>  
> -Which shows that e05db0fd is reachable from itself, from v1.5.0-rc1, and
> -from v1.5.0-rc2, but not from v1.5.0-rc0.
> +shows that e05db0fd is reachable from itself, from v1.5.0-rc1,
> +and from v1.5.0-rc2, and not from v1.5.0-rc0.
This is easier to read. Good.
Thomas Ackermann· Aug 27, 2013, 18:01 UTC · re: Thomas Ackermann · lore

[PATCH 06/11] Simplify "How to make a commit"

Combine the two cases for "git add" into one. Add verb "use" to "git rm" case.

Signed-off-by: Thomas Ackermann <th.acker@arcor.de>
---
 Documentation/user-manual.txt | 10 ++--------
 1 file changed, 2 insertions(+), 8 deletions(-)
Show changes to Documentation/user-manual.txt +2 −6
diff --git a/Documentation/user-manual.txt b/Documentation/user-manual.txt
index 465d9cb..98d2804 100644
--- a/Documentation/user-manual.txt
+++ b/Documentation/user-manual.txt
@@ -1080,19 +1080,13 @@ produce no output at that point.
 
 Modifying the index is easy:
 
-To update the index with the new contents of a modified file, use
+To update the index with the contents of a new or modified file, use
 
 -------------------------------------------------
 $ git add path/to/file
 -------------------------------------------------
 
-To add the contents of a new file to the index, use
-
--------------------------------------------------
-$ git add path/to/file
--------------------------------------------------
-
-To remove a file from the index and from the working tree,
+To remove a file from the index and from the working tree, use
 
 -------------------------------------------------
 $ git rm path/to/file
-- 
1.8.3.msysgit.0


---
Thomas
Thomas Ackermann· Aug 27, 2013, 18:02 UTC · re: Thomas Ackermann · lore

[PATCH 07/11] Improve section "Manipulating branches"

Add some missing punctuation. Simplify description of "git branch -d/-D".

Signed-off-by: Thomas Ackermann <th.acker@arcor.de>
---
 Documentation/user-manual.txt | 20 ++++++++------------
 1 file changed, 8 insertions(+), 12 deletions(-)
Show changes to Documentation/user-manual.txt +8 −12
diff --git a/Documentation/user-manual.txt b/Documentation/user-manual.txt
index 98d2804..c20e8df 100644
--- a/Documentation/user-manual.txt
+++ b/Documentation/user-manual.txt
@@ -268,27 +268,23 @@ Creating, deleting, and modifying branches is quick and easy; here's
 a summary of the commands:
 
 `git branch`::
-	list all branches
+	list all branches.
 `git branch <branch>`::
 	create a new branch named `<branch>`, referencing the same
-	point in history as the current branch
+	point in history as the current branch.
 `git branch <branch> <start-point>`::
 	create a new branch named `<branch>`, referencing
 	`<start-point>`, which may be specified any way you like,
-	including using a branch name or a tag name
+	including using a branch name or a tag name.
 `git branch -d <branch>`::
-	delete the branch `<branch>`; if the branch you are deleting
-	points to a commit which is not reachable from the current
-	branch, this command will fail with a warning.
+	delete the branch `<branch>`; if the branch is not fully
+	merged in its upstream branch or contained in the current branch, 
+	this command will fail with a warning.
 `git branch -D <branch>`::
-	even if the branch points to a commit not reachable
-	from the current branch, you may know that that commit
-	is still reachable from some other branch or tag.  In that
-	case it is safe to use this command to force Git to delete
-	the branch.
+	delete the branch `<branch>` irrespective of its merged status.
 `git checkout <branch>`::
 	make the current branch `<branch>`, updating the working
-	directory to reflect the version referenced by `<branch>`
+	directory to reflect the version referenced by `<branch>`.
 `git checkout -b <new> <start-point>`::
 	create a new branch `<new>` referencing `<start-point>`, and
 	check it out.
-- 
1.8.3.msysgit.0


---
Thomas
Junio C Hamano· Aug 27, 2013, 19:11 UTC · re: Thomas Ackermann · lore

Re: [PATCH 07/11] Improve section "Manipulating branches"

Thomas Ackermann <th.acker@arcor.de> writes:
Show 7 quoted lines
>  `git branch -d <branch>`::
> -	delete the branch `<branch>`; if the branch you are deleting
> -	points to a commit which is not reachable from the current
> -	branch, this command will fail with a warning.
> +	delete the branch `<branch>`; if the branch is not fully
> +	merged in its upstream branch or contained in the current branch, 
> +	this command will fail with a warning.

This is not a new problem, but it fails with an error, not a warning (which often is a message to caution but operation gets carried out anyway). For that matter, it might be better to say "stops", as it is not a failure but is saving the user from losing information (in other words, that is a different kind of success ;-).

It also stops you from deleting the branch you are currently on. I wonder if we want to mention that, too?

Show 14 quoted lines
>  `git branch -D <branch>`::
> -	even if the branch points to a commit not reachable
> -	from the current branch, you may know that that commit
> -	is still reachable from some other branch or tag.  In that
> -	case it is safe to use this command to force Git to delete
> -	the branch.
> +	delete the branch `<branch>` irrespective of its merged status.
>  `git checkout <branch>`::
>  	make the current branch `<branch>`, updating the working
> -	directory to reflect the version referenced by `<branch>`
> +	directory to reflect the version referenced by `<branch>`.
>  `git checkout -b <new> <start-point>`::
>  	create a new branch `<new>` referencing `<start-point>`, and
>  	check it out.
Thomas Ackermann· Aug 27, 2013, 18:03 UTC · re: Thomas Ackermann · lore

[PATCH 08/11] Improve section "Merging multiple trees"

Remove unnecessary quoting. Simplify description of three-way merge.

Signed-off-by: Jonathan Nieder <jrnieder@gmail.com>
Signed-off-by: Thomas Ackermann <th.acker@arcor.de>
---
 Documentation/user-manual.txt | 27 +++++++++++++--------------
 1 file changed, 13 insertions(+), 14 deletions(-)
Show changes to Documentation/user-manual.txt +13 −14
diff --git a/Documentation/user-manual.txt b/Documentation/user-manual.txt
index c20e8df..a7ca3e3 100644
--- a/Documentation/user-manual.txt
+++ b/Documentation/user-manual.txt
@@ -4004,27 +4004,26 @@ to see what the top commit was.
 Merging multiple trees
 ----------------------
 
-Git helps you do a three-way merge, which you can expand to n-way by
-repeating the merge procedure arbitrary times until you finally
-"commit" the state.  The normal situation is that you'd only do one
-three-way merge (two parents), and commit it, but if you like to, you
-can do multiple parents in one go.
+Git can help you perform a three-way merge, which can in turn be
+used for a many-way merge by repeating the merge procedure several
+times.  The usual situation is that you only do one three-way merge
+(reconciling two lines of history) and commit the result, but if
+you like to, you can merge several branches in one go.
 
-To do a three-way merge, you need the two sets of "commit" objects
-that you want to merge, use those to find the closest common parent (a
-third "commit" object), and then use those commit objects to find the
-state of the directory ("tree" object) at these points.
+To perform a three-way merge, you start with the two commits you
+want to merge, find their closest common parent (a third commit),
+and compare the trees corresponding to these three commits.
 
-To get the "base" for the merge, you first look up the common parent
-of two commits with
+To get the "base" for the merge, look up the common parent of two
+commits:
 
 -------------------------------------------------
 $ git merge-base <commit1> <commit2>
 -------------------------------------------------
 
-which will return you the commit they are both based on.  You should
-now look up the "tree" objects of those commits, which you can easily
-do with (for example)
+This prints the name of a commit they are both based on. You should
+now look up the tree objects of those commits, which you can easily
+do with
 
 -------------------------------------------------
 $ git cat-file commit <commitname> | head -1
-- 
1.8.3.msysgit.0


---
Thomas
Junio C Hamano· Aug 27, 2013, 19:15 UTC · re: Thomas Ackermann · lore

Re: [PATCH 08/11] Improve section "Merging multiple trees"

Thomas Ackermann <th.acker@arcor.de> writes:
Show 6 quoted lines
> Remove unnecessary quoting.
> Simplify description of three-way merge.
>
> Signed-off-by: Jonathan Nieder <jrnieder@gmail.com>
> Signed-off-by: Thomas Ackermann <th.acker@arcor.de>
> ---

The update is good, but I wonder if this belongs to "User's manual" these days.

Perhaps we should start thinking about ripping the "how to use plumbing" out of the end-user manual and moving them to the core-tutorial where this kind of thing is more suited for.

Thomas Ackermann· Aug 27, 2013, 18:04 UTC · re: Thomas Ackermann · lore

[PATCH 09/11] Remove unnecessary historical note from "Object storage format"

Signed-off-by: Thomas Ackermann <th.acker@arcor.de>
---
 Documentation/user-manual.txt | 2 --
 1 file changed, 2 deletions(-)
Show changes to Documentation/user-manual.txt +0 −2
diff --git a/Documentation/user-manual.txt b/Documentation/user-manual.txt
index a7ca3e3..56bd088 100644
--- a/Documentation/user-manual.txt
+++ b/Documentation/user-manual.txt
@@ -4145,8 +4145,6 @@ about the data in the object.  It's worth noting that the SHA-1 hash
 that is used to name the object is the hash of the original data
 plus this header, so `sha1sum` 'file' does not match the object name
 for 'file'.
-(Historical note: in the dawn of the age of Git the hash
-was the SHA-1 of the 'compressed' object.)
 
 As a result, the general consistency of an object can always be tested
 independently of the contents or the type of the object: all objects can
-- 
1.8.3.msysgit.0


---
Thomas
Thomas Ackermann· Aug 27, 2013, 18:04 UTC · re: Thomas Ackermann · lore

[PATCH 10/11] Remove irrelevant reference from "Tying it all together"

Sorry Jon, but this might not be of any help to new Git users ;)
Acked-by: Jon Loeliger <jdl@jdl.com>
Signed-off-by: Thomas Ackermann <th.acker@arcor.de>
---
 Documentation/user-manual.txt | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)
Show changes to Documentation/user-manual.txt +1 −2
diff --git a/Documentation/user-manual.txt b/Documentation/user-manual.txt
index 56bd088..9149846 100644
--- a/Documentation/user-manual.txt
+++ b/Documentation/user-manual.txt
@@ -3924,8 +3924,7 @@ save the note about that state, in practice we tend to just write the
 result to the file pointed at by `.git/HEAD`, so that we can always see
 what the last committed state was.
 
-Here is an ASCII art by Jon Loeliger that illustrates how
-various pieces fit together.
+Here is a picture that illustrates how various pieces fit together:
 
 ------------
 
-- 
1.8.3.msysgit.0


---
Thomas
Thomas Ackermann· Aug 27, 2013, 18:05 UTC · re: Thomas Ackermann · lore

[PATCH 11/11] "git prune" is safe

"git prune" is safe in case of concurrent accesses to a repository but using it in such a case is not recommended.

Signed-off-by: Thomas Ackermann <th.acker@arcor.de>
---
 Documentation/user-manual.txt | 12 +++---------
 1 file changed, 3 insertions(+), 9 deletions(-)
Show changes to Documentation/user-manual.txt +3 −9
diff --git a/Documentation/user-manual.txt b/Documentation/user-manual.txt
index 9149846..ea843e6 100644
--- a/Documentation/user-manual.txt
+++ b/Documentation/user-manual.txt
@@ -3299,17 +3299,11 @@ state, you can just prune all unreachable objects:
 $ git prune
 ------------------------------------------------
 
-and they'll be gone. But you should only run `git prune` on a quiescent
+and they'll be gone. (You should only run `git prune` on a quiescent
 repository--it's kind of like doing a filesystem fsck recovery: you
 don't want to do that while the filesystem is mounted.
-
-(The same is true of `git fsck` itself, btw, but since
-`git fsck` never actually *changes* the repository, it just reports
-on what it found, `git fsck` itself is never 'dangerous' to run.
-Running it while somebody is actually changing the repository can cause
-confusing and scary messages, but it won't actually do anything bad. In
-contrast, running `git prune` while somebody is actively changing the
-repository is a *BAD* idea).
+`git prune` is designed not to cause any harm in such cases of concurrent
+accesses to a repository but you might receive confusing or scary messages.)
 
 [[recovering-from-repository-corruption]]
 Recovering from repository corruption
-- 
1.8.3.msysgit.0


---
Thomas
Junio C Hamano· Aug 27, 2013, 19:17 UTC · re: Thomas Ackermann · lore

Re: [PATCH 11/11] "git prune" is safe

Thomas Ackermann <th.acker@arcor.de> writes:
Show 30 quoted lines
> "git prune" is safe in case of concurrent accesses to a repository
> but using it in such a case is not recommended.
>
> Signed-off-by: Thomas Ackermann <th.acker@arcor.de>
> ---
>  Documentation/user-manual.txt | 12 +++---------
>  1 file changed, 3 insertions(+), 9 deletions(-)
>
> diff --git a/Documentation/user-manual.txt b/Documentation/user-manual.txt
> index 9149846..ea843e6 100644
> --- a/Documentation/user-manual.txt
> +++ b/Documentation/user-manual.txt
> @@ -3299,17 +3299,11 @@ state, you can just prune all unreachable objects:
>  $ git prune
>  ------------------------------------------------
>  
> -and they'll be gone. But you should only run `git prune` on a quiescent
> +and they'll be gone. (You should only run `git prune` on a quiescent
>  repository--it's kind of like doing a filesystem fsck recovery: you
>  don't want to do that while the filesystem is mounted.
> -
> -(The same is true of `git fsck` itself, btw, but since
> -`git fsck` never actually *changes* the repository, it just reports
> -on what it found, `git fsck` itself is never 'dangerous' to run.
> -Running it while somebody is actually changing the repository can cause
> -confusing and scary messages, but it won't actually do anything bad. In
> -contrast, running `git prune` while somebody is actively changing the
> -repository is a *BAD* idea).
> +`git prune` is designed not to cause any harm in such cases of concurrent
> +accesses to a repository but you might receive confusing or scary messages.)

These new two lines are good, but did we lose the mention of "fsck" that will report what is not dangling as dangling and such when run concurrently with other operations? Is that intended?

>  
>  [[recovering-from-repository-corruption]]
>  Recovering from repository corruption

← back to recent threads