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> 15'git-remote' prune <name> 16'git-remote' update 17 18DESCRIPTION 19----------- 20 21Manage the set of repositories ("remotes") whose branches you track. 22 23 24COMMANDS 25-------- 26 27With no arguments, shows a list of existing remotes. Several 28subcommands are available to perform operations on the remotes. 29 30'add':: 31 32Adds a remote named <name> for the repository at 33<url>. The command `git fetch <name>` can then be used to create and 34update remote-tracking branches <name>/<branch>. 35 36'show':: 37 38Gives some information about the remote <name>. 39 40'prune':: 41 42Deletes all stale tracking branches under <name>. 43These stale branches have already been removed from the remote repository 44referenced by <name>, but are still locally available in 45"remotes/<name>". 46 47'update':: 48 49Fetch updates for the remotes in the repository. By default all remotes 50are updated, but this can be configured via the configuration parameter 51'remote.fetch'. (See gitlink:git-config[1]). 52 53 54DISCUSSION 55---------- 56 57The remote configuration is achieved using the `remote.origin.url` and 58`remote.origin.fetch` configuration variables. (See 59gitlink:git-config[1]). 60 61Examples 62-------- 63 64Add a new remote, fetch, and check out a branch from it: 65 66------------ 67$ git remote 68origin 69$ git branch -r 70origin/master 71$ git remote add linux-nfs git://linux-nfs.org/pub/nfs-2.6.git 72$ git remote 73linux-nfs 74origin 75$ git fetch 76* refs/remotes/linux-nfs/master: storing branch 'master' ... 77 commit: bf81b46 78$ git branch -r 79origin/master 80linux-nfs/master 81$ git checkout -b nfs linux-nfs/master 82... 83------------ 84 85See Also 86-------- 87gitlink:git-fetch[1] 88gitlink:git-branch[1] 89gitlink:git-config[1] 90 91Author 92------ 93Written by Junio Hamano 94 95 96Documentation 97-------------- 98Documentation by J. Bruce Fields and the git-list <git@vger.kernel.org>. 99 100 101GIT 102--- 103Part of the gitlink:git[7] suite 104