Allow git-remote to update named groups of remotes
[git/git.git] / Documentation / git-remote.txt
CommitLineData
041e69c9
BF
1git-remote(1)
2============
3
4NAME
5----
6git-remote - manage set of tracked repositories
7
8
9SYNOPSIS
10--------
11[verse]
12'git-remote'
13'git-remote' add <name> <url>
14'git-remote' show <name>
859607df 15'git-remote' prune <name>
1918278e 16'git-remote' update [group]
041e69c9
BF
17
18DESCRIPTION
19-----------
20
21Manage the set of repositories ("remotes") whose branches you track.
22
041e69c9 23
0f390875
SP
24COMMANDS
25--------
26
27With no arguments, shows a list of existing remotes. Several
28subcommands are available to perform operations on the remotes.
29
30'add'::
31
32Adds a remote named <name> for the repository at
041e69c9
BF
33<url>. The command `git fetch <name>` can then be used to create and
34update remote-tracking branches <name>/<branch>.
35
0f390875 36'show'::
041e69c9 37
0f390875
SP
38Gives some information about the remote <name>.
39
40'prune'::
41
42Deletes all stale tracking branches under <name>.
859607df 43These stale branches have already been removed from the remote repository
1e592d65
TT
44referenced by <name>, but are still locally available in
45"remotes/<name>".
46
47'update'::
48
1918278e
TT
49Fetch updates for a named set of remotes in the repository as defined by
50remotes.<group>. If a named group is not specified on the command line,
51the configuration parameter remotes.default will get used; if
52remotes.default is not defined, all remotes which do not the
53configuration parameter remote.<name>.skipDefaultUpdate set to true will
54be updated. (See gitlink:git-config[1]).
859607df 55
0f390875
SP
56
57DISCUSSION
58----------
59
041e69c9
BF
60The remote configuration is achieved using the `remote.origin.url` and
61`remote.origin.fetch` configuration variables. (See
e0d10e1c 62gitlink:git-config[1]).
041e69c9
BF
63
64Examples
65--------
66
67Add a new remote, fetch, and check out a branch from it:
68
69------------
70$ git remote
71origin
72$ git branch -r
73origin/master
74$ git remote add linux-nfs git://linux-nfs.org/pub/nfs-2.6.git
75$ git remote
76linux-nfs
77origin
78$ git fetch
79* refs/remotes/linux-nfs/master: storing branch 'master' ...
80 commit: bf81b46
81$ git branch -r
82origin/master
83linux-nfs/master
84$ git checkout -b nfs linux-nfs/master
85...
86------------
87
88See Also
89--------
90gitlink:git-fetch[1]
91gitlink:git-branch[1]
e0d10e1c 92gitlink:git-config[1]
041e69c9
BF
93
94Author
95------
96Written by Junio Hamano
97
98
99Documentation
100--------------
101Documentation by J. Bruce Fields and the git-list <git@vger.kernel.org>.
102
103
104GIT
105---
106Part of the gitlink:git[7] suite
107