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