Teach git-remote to update existing remotes by fetching from them
[git/haiku.git] / Documentation / git-remote.txt
blob06ba2e6f26aca732c70d04b6d59190dd0e3a683e
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>
16 'git-remote' update
18 DESCRIPTION
19 -----------
21 Manage the set of repositories ("remotes") whose branches you track.
24 COMMANDS
25 --------
27 With no arguments, shows a list of existing remotes.  Several
28 subcommands are available to perform operations on the remotes.
30 'add'::
32 Adds a remote named <name> for the repository at
33 <url>.  The command `git fetch <name>` can then be used to create and
34 update remote-tracking branches <name>/<branch>.
36 'show'::
38 Gives some information about the remote <name>.
40 'prune'::
42 Deletes all stale tracking branches under <name>.
43 These stale branches have already been removed from the remote repository
44 referenced by <name>, but are still locally available in
45 "remotes/<name>".
47 'update'::
49 Fetch updates for the remotes in the repository.  By default all remotes
50 are updated, but this can be configured via the configuration parameter
51 'remote.fetch'.   (See gitlink:git-config[1]).
54 DISCUSSION
55 ----------
57 The remote configuration is achieved using the `remote.origin.url` and
58 `remote.origin.fetch` configuration variables.  (See
59 gitlink:git-config[1]).
61 Examples
62 --------
64 Add a new remote, fetch, and check out a branch from it:
66 ------------
67 $ git remote
68 origin
69 $ git branch -r
70 origin/master
71 $ git remote add linux-nfs git://linux-nfs.org/pub/nfs-2.6.git
72 $ git remote
73 linux-nfs
74 origin
75 $ git fetch
76 * refs/remotes/linux-nfs/master: storing branch 'master' ...
77   commit: bf81b46
78 $ git branch -r
79 origin/master
80 linux-nfs/master
81 $ git checkout -b nfs linux-nfs/master
82 ...
83 ------------
85 See Also
86 --------
87 gitlink:git-fetch[1]
88 gitlink:git-branch[1]
89 gitlink:git-config[1]
91 Author
92 ------
93 Written by Junio Hamano
96 Documentation
97 --------------
98 Documentation by J. Bruce Fields and the git-list <git@vger.kernel.org>.
103 Part of the gitlink:git[7] suite