6 git-remote - manage set of tracked repositories
13 'git-remote' add [-t <branch>] [-m <branch>] [-f] <name> <url>
14 'git-remote' show <name>
15 'git-remote' prune <name>
20 Manage the set of repositories ("remotes") whose branches you track.
26 With no arguments, shows a list of existing remotes. Several
27 subcommands are available to perform operations on the remotes.
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>.
35 With `-f` option, `git fetch <name>` is run immediately after
36 the remote information is set up.
38 With `-t <branch>` option, instead of the default glob
39 refspec for the remote to track all branches under
40 `$GIT_DIR/remotes/<name>/`, a refspec to track only `<branch>`
41 is created. You can give more than one `-t <branch>` to track
42 multiple branche without grabbing all branches.
44 With `-m <master>` option, `$GIT_DIR/remotes/<name>/HEAD` is set
45 up to point at remote's `<master>` branch instead of whatever
46 branch the `HEAD` at the remote repository actually points at.
50 Gives some information about the remote <name>.
54 Deletes all stale tracking branches under <name>.
55 These stale branches have already been removed from the remote repository
56 referenced by <name>, but are still locally available in "remotes/<name>".
62 The remote configuration is achieved using the `remote.origin.url` and
63 `remote.origin.fetch` configuration variables. (See
64 gitlink:git-config[1]).
69 * Add a new remote, fetch, and check out a branch from it
76 $ git remote add linux-nfs git://linux-nfs.org/pub/nfs-2.6.git
81 * refs/remotes/linux-nfs/master: storing branch 'master' ...
86 $ git checkout -b nfs linux-nfs/master
90 * Imitate 'git clone' but track only selected branches
96 $ git remote add -f -t master -m master origin git://example.com/git.git/
104 gitlink:git-branch[1]
105 gitlink:git-config[1]
109 Written by Junio Hamano
114 Documentation by J. Bruce Fields and the git-list <git@vger.kernel.org>.
119 Part of the gitlink:git[7] suite