blame: document --contents option
[git/gitweb.git] / Documentation / git-remote.txt
bloba60c31a3150ca8109b1fb16aaf8ff485b57c9932
1 git-remote(1)
2 ============
4 NAME
5 ----
6 git-remote - manage set of tracked repositories
9 SYNOPSIS
10 --------
11 [verse]
12 'git-remote'
13 'git-remote' add <name> <url>
14 'git-remote' show <name>
15 'git-remote' prune <name>
17 DESCRIPTION
18 -----------
20 Manage the set of repositories ("remotes") whose branches you track.
23 COMMANDS
24 --------
26 With no arguments, shows a list of existing remotes.  Several
27 subcommands are available to perform operations on the remotes.
29 'add'::
31 Adds a remote named <name> for the repository at
32 <url>.  The command `git fetch <name>` can then be used to create and
33 update remote-tracking branches <name>/<branch>.
35 'show'::
37 Gives some information about the remote <name>.
39 'prune'::
41 Deletes all stale tracking branches under <name>.
42 These stale branches have already been removed from the remote repository
43 referenced by <name>, but are still locally available in "remotes/<name>".
46 DISCUSSION
47 ----------
49 The remote configuration is achieved using the `remote.origin.url` and
50 `remote.origin.fetch` configuration variables.  (See
51 gitlink:git-config[1]).
53 Examples
54 --------
56 Add a new remote, fetch, and check out a branch from it:
58 ------------
59 $ git remote
60 origin
61 $ git branch -r
62 origin/master
63 $ git remote add linux-nfs git://linux-nfs.org/pub/nfs-2.6.git
64 $ git remote
65 linux-nfs
66 origin
67 $ git fetch
68 * refs/remotes/linux-nfs/master: storing branch 'master' ...
69   commit: bf81b46
70 $ git branch -r
71 origin/master
72 linux-nfs/master
73 $ git checkout -b nfs linux-nfs/master
74 ...
75 ------------
77 See Also
78 --------
79 gitlink:git-fetch[1]
80 gitlink:git-branch[1]
81 gitlink:git-config[1]
83 Author
84 ------
85 Written by Junio Hamano
88 Documentation
89 --------------
90 Documentation by J. Bruce Fields and the git-list <git@vger.kernel.org>.
93 GIT
94 ---
95 Part of the gitlink:git[7] suite