Skip to content

Commit

Permalink
Documentation: Update the NFS remote examples to use the staging repo
Browse files Browse the repository at this point in the history
linux-nfs.org seems to have restructured their repository layout since
8391c60 (git-remote.txt: fix example url, 2007-11-02), and Bruce's
repo is now at git://git.linux-nfs.org/projects/bfields/linux.git.
Bruce also has a more richer internal branch structure (master,
everything, for-3.1, ...), so updating the existing example to use his
current repo may be confusing.

To simplify, I've replaced the NFS repo with Greg's staging repo.
I've also updated the output of the surrounding commands to match the
output of a current run through.

Signed-off-by: W. Trevor King <wking@tremily.us>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
  • Loading branch information
W. Trevor King authored and Junio C Hamano committed Jun 23, 2013
1 parent f22a654 commit 34a25d4
Show file tree
Hide file tree
Showing 2 changed files with 32 additions and 19 deletions.
25 changes: 16 additions & 9 deletions Documentation/git-remote.txt
Original file line number Diff line number Diff line change
Expand Up @@ -187,18 +187,25 @@ Examples
$ git remote
origin
$ git branch -r
origin/master
$ git remote add linux-nfs git://linux-nfs.org/pub/linux/nfs-2.6.git
origin/HEAD -> origin/master
origin/master
$ git remote add staging git://git.kernel.org/.../gregkh/staging.git
$ git remote
linux-nfs
origin
$ git fetch
* refs/remotes/linux-nfs/master: storing branch 'master' ...
commit: bf81b46
staging
$ git fetch staging
...
From git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/staging
* [new branch] master -> staging/master
* [new branch] staging-linus -> staging/staging-linus
* [new branch] staging-next -> staging/staging-next
$ git branch -r
origin/master
linux-nfs/master
$ git checkout -b nfs linux-nfs/master
origin/HEAD -> origin/master
origin/master
staging/master
staging/staging-linus
staging/staging-next
$ git checkout -b staging staging/master
...
------------

Expand Down
26 changes: 16 additions & 10 deletions Documentation/user-manual.txt
Original file line number Diff line number Diff line change
Expand Up @@ -431,19 +431,25 @@ You can also track branches from repositories other than the one you
cloned from, using linkgit:git-remote[1]:

-------------------------------------------------
$ git remote add linux-nfs git://linux-nfs.org/pub/nfs-2.6.git
$ git fetch linux-nfs
* refs/remotes/linux-nfs/master: storing branch 'master' ...
commit: bf81b46
$ git remote add staging git://git.kernel.org/.../gregkh/staging.git
$ git fetch staging
...
From git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/staging
* [new branch] master -> staging/master
* [new branch] staging-linus -> staging/staging-linus
* [new branch] staging-next -> staging/staging-next
-------------------------------------------------

New remote-tracking branches will be stored under the shorthand name
that you gave `git remote add`, in this case `linux-nfs`:
that you gave `git remote add`, in this case `staging`:

-------------------------------------------------
$ git branch -r
linux-nfs/master
origin/master
origin/HEAD -> origin/master
origin/master
staging/master
staging/staging-linus
staging/staging-next
-------------------------------------------------

If you run `git fetch <remote>` later, the remote-tracking branches
Expand All @@ -455,9 +461,9 @@ a new stanza:
-------------------------------------------------
$ cat .git/config
...
[remote "linux-nfs"]
url = git://linux-nfs.org/pub/nfs-2.6.git
fetch = +refs/heads/*:refs/remotes/linux-nfs/*
[remote "staging"]
url = git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/staging.git
fetch = +refs/heads/*:refs/remotes/staging/*
...
-------------------------------------------------

Expand Down

0 comments on commit 34a25d4

Please sign in to comment.