]> asedeno.scripts.mit.edu Git - git.git/blob - Documentation/git-remote.txt
Merge git://repo.or.cz/git-gui into maint
[git.git] / Documentation / git-remote.txt
1 git-remote(1)
2 ============
3
4 NAME
5 ----
6 git-remote - manage set of tracked repositories
7
8
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
17 DESCRIPTION
18 -----------
19
20 Manage the set of repositories ("remotes") whose branches you track.
21
22
23 COMMANDS
24 --------
25
26 With no arguments, shows a list of existing remotes.  Several
27 subcommands are available to perform operations on the remotes.
28
29 'add'::
30
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>.
34
35 'show'::
36
37 Gives some information about the remote <name>.
38
39 'prune'::
40
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>".
44
45
46 DISCUSSION
47 ----------
48
49 The remote configuration is achieved using the `remote.origin.url` and
50 `remote.origin.fetch` configuration variables.  (See
51 gitlink:git-config[1]).
52
53 Examples
54 --------
55
56 Add a new remote, fetch, and check out a branch from it:
57
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 ------------
76
77 See Also
78 --------
79 gitlink:git-fetch[1]
80 gitlink:git-branch[1]
81 gitlink:git-config[1]
82
83 Author
84 ------
85 Written by Junio Hamano
86
87
88 Documentation
89 --------------
90 Documentation by J. Bruce Fields and the git-list <git@vger.kernel.org>.
91
92
93 GIT
94 ---
95 Part of the gitlink:git[7] suite
96