]>
Commit | Line | Data |
---|---|---|
041e69c9 BF |
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> | |
859607df | 15 | 'git-remote' prune <name> |
041e69c9 BF |
16 | |
17 | DESCRIPTION | |
18 | ----------- | |
19 | ||
20 | Manage the set of repositories ("remotes") whose branches you track. | |
21 | ||
22 | With no arguments, shows a list of existing remotes. | |
23 | ||
24 | In the second form, adds a remote named <name> for the repository at | |
25 | <url>. The command `git fetch <name>` can then be used to create and | |
26 | update remote-tracking branches <name>/<branch>. | |
27 | ||
28 | In the third form, gives some information about the remote <name>. | |
29 | ||
859607df SP |
30 | In the fourth form, deletes all stale tracking branches under <name>. |
31 | These stale branches have already been removed from the remote repository | |
32 | referenced by <name>, but are still locally available in "remotes/<name>". | |
33 | ||
041e69c9 BF |
34 | The remote configuration is achieved using the `remote.origin.url` and |
35 | `remote.origin.fetch` configuration variables. (See | |
e0d10e1c | 36 | gitlink:git-config[1]). |
041e69c9 BF |
37 | |
38 | Examples | |
39 | -------- | |
40 | ||
41 | Add a new remote, fetch, and check out a branch from it: | |
42 | ||
43 | ------------ | |
44 | $ git remote | |
45 | origin | |
46 | $ git branch -r | |
47 | origin/master | |
48 | $ git remote add linux-nfs git://linux-nfs.org/pub/nfs-2.6.git | |
49 | $ git remote | |
50 | linux-nfs | |
51 | origin | |
52 | $ git fetch | |
53 | * refs/remotes/linux-nfs/master: storing branch 'master' ... | |
54 | commit: bf81b46 | |
55 | $ git branch -r | |
56 | origin/master | |
57 | linux-nfs/master | |
58 | $ git checkout -b nfs linux-nfs/master | |
59 | ... | |
60 | ------------ | |
61 | ||
62 | See Also | |
63 | -------- | |
64 | gitlink:git-fetch[1] | |
65 | gitlink:git-branch[1] | |
e0d10e1c | 66 | gitlink:git-config[1] |
041e69c9 BF |
67 | |
68 | Author | |
69 | ------ | |
70 | Written by Junio Hamano | |
71 | ||
72 | ||
73 | Documentation | |
74 | -------------- | |
75 | Documentation by J. Bruce Fields and the git-list <git@vger.kernel.org>. | |
76 | ||
77 | ||
78 | GIT | |
79 | --- | |
80 | Part of the gitlink:git[7] suite | |
81 |