Skip to content

Commit

Permalink
Documentation: clone: clarify discussion of initial branch
Browse files Browse the repository at this point in the history
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.

Signed-off-by: Jonathan Nieder <jrnieder@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
  • Loading branch information
Jonathan Nieder authored and Junio C Hamano committed Oct 10, 2009
1 parent a17a960 commit 33405be
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions Documentation/git-clone.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 33405be

Please sign in to comment.