Documentation: update git-clone man page with new behavior
Update git-clone man page to reflect recent changes (--use-separate-remote default and use of .git/config instead of remotes files), and rewrite introduction. Signed-off-by: J. Bruce Fields <bfields@citi.umich.edu> Signed-off-by: Junio C Hamano <junkio@cox.net>
This commit is contained in:

committed by
Junio C Hamano

parent
efe2c9e002
commit
db9819a40a
@ -16,22 +16,21 @@ SYNOPSIS
|
|||||||
|
|
||||||
DESCRIPTION
|
DESCRIPTION
|
||||||
-----------
|
-----------
|
||||||
Clones a repository into a newly created directory. All remote
|
|
||||||
branch heads are copied under `$GIT_DIR/refs/heads/`, except
|
|
||||||
that the remote `master` is also copied to `origin` branch.
|
|
||||||
|
|
||||||
In addition, `$GIT_DIR/remotes/origin` file is set up to have
|
Clones a repository into a newly created directory, creates
|
||||||
this line:
|
remote-tracking branches for each branch in the cloned repository
|
||||||
|
(visible using `git branch -r`), and creates and checks out a master
|
||||||
|
branch equal to the cloned repository's master branch.
|
||||||
|
|
||||||
Pull: master:origin
|
After the clone, a plain `git fetch` without arguments will update
|
||||||
|
all the remote-tracking branches, and a `git pull` without
|
||||||
This is to help the typical workflow of working off of the
|
arguments will in addition merge the remote master branch into the
|
||||||
remote `master` branch. Every time `git pull` without argument
|
current branch.
|
||||||
is run, the progress on the remote `master` branch is tracked by
|
|
||||||
copying it into the local `origin` branch, and merged into the
|
|
||||||
branch you are currently working on. Remote branches other than
|
|
||||||
`master` are also added there to be tracked.
|
|
||||||
|
|
||||||
|
This default configuration is achieved by creating references to
|
||||||
|
the remote branch heads under `$GIT_DIR/refs/remotes/origin` and
|
||||||
|
by initializing `remote.origin.url` and `remote.origin.fetch`
|
||||||
|
configuration variables.
|
||||||
|
|
||||||
OPTIONS
|
OPTIONS
|
||||||
-------
|
-------
|
||||||
|
Reference in New Issue
Block a user