Why is it bad to rewind a branch that has already been pushed out?
[git/jrn.git] / Documentation / git-remote.txt
blob817651eaa443b2fdc527cb3955421c1f9a825373
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>
17 DESCRIPTION
18 -----------
20 Manage the set of repositories ("remotes") whose branches you track.
22 With no arguments, shows a list of existing remotes.
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>.
28 In the third form, gives some information about the remote <name>.
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>".
34 The remote configuration is achieved using the `remote.origin.url` and
35 `remote.origin.fetch` configuration variables.  (See
36 gitlink:git-config[1]).
38 Examples
39 --------
41 Add a new remote, fetch, and check out a branch from it:
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 ------------
62 See Also
63 --------
64 gitlink:git-fetch[1]
65 gitlink:git-branch[1]
66 gitlink:git-config[1]
68 Author
69 ------
70 Written by Junio Hamano
73 Documentation
74 --------------
75 Documentation by J. Bruce Fields and the git-list <git@vger.kernel.org>.
78 GIT
79 ---
80 Part of the gitlink:git[7] suite