Thread (2 messages) flat view 2 messages, 2 authors, 2016-06-15
DORMANTno replies

[PATCH 5/9 v2] Documentation: clone: clarify discussion of initial branch

From: Jonathan Nieder <hidden>
Date: 2016-06-15 22:47:30
Subsystem: documentation, the rest · Maintainers: Jonathan Corbet, Linus Torvalds

When saying the initial branch is equal to the currently active
remote branch, it is probably intended that the branch heads
point to the same commit.  Maybe it would be more useful to a
new user to emphasize that the tree contents and history are the
same.

More important, probably, is that this new branch is set up so
that "git pull" merges changes from the corresponding remote
branch.  The next paragraph addresses that directly.  What the
reader needs to know to begin with is that (1) the initial branch
is your own; if you do not pull, it won't get updated, and that
(2) the initial branch starts out at the same commit as the
upstream.

Thanks to Junio C Hamano for the wording.

Signed-off-by: Jonathan Nieder <redacted>
---
Junio C Hamano wrote:
Perhaps

    ... creates and checks out an initial branch that is forked from the
    cloned repository's currently active branch.

would convey that (1) the initial branch is your own; if you do not pull,
you won't get updated, and that (2) the initial branch starts out at the
same commit as the upstream.
That does work better.  Explanation stolen for the commit message ---
I hope you don't mind.

Thanks,
Jonathan

 Documentation/git-clone.txt |    5 +++--
 1 files changed, 3 insertions(+), 2 deletions(-)
diff --git a/Documentation/git-clone.txt b/Documentation/git-clone.txt
index aacf4fd..5ebcba1 100644
--- a/Documentation/git-clone.txt
+++ b/Documentation/git-clone.txt
@@ -19,8 +19,9 @@ DESCRIPTION
 
 Clones a repository into a newly created directory, creates
 remote-tracking branches for each branch in the cloned repository
-(visible using `git branch -r`), and creates and checks out an initial
-branch equal to the cloned repository's currently active branch.
+(visible using `git branch -r`), and creates and checks out an
+initial branch that is forked from the cloned repository's
+currently active branch.
 
 After the clone, a plain `git fetch` without arguments will update
 all the remote-tracking branches, and a `git pull` without
-- 
1.6.5.rc1.199.g596ec
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help