mergetool: Fix typo in options passed to kdiff3
[git/mergetool.git] / Documentation / git-remote.txt
blob61a6022ce8a0fc7aac8b1e9bd08587817ef0d69c
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 [-t <branch>] [-m <branch>] [-f] <name> <url>
14 'git-remote' show <name>
15 'git-remote' prune <name>
16 'git-remote' update [group]
18 DESCRIPTION
19 -----------
21 Manage the set of repositories ("remotes") whose branches you track.
24 COMMANDS
25 --------
27 With no arguments, shows a list of existing remotes.  Several
28 subcommands are available to perform operations on the remotes.
30 'add'::
32 Adds a remote named <name> for the repository at
33 <url>.  The command `git fetch <name>` can then be used to create and
34 update remote-tracking branches <name>/<branch>.
36 With `-f` option, `git fetch <name>` is run immediately after
37 the remote information is set up.
39 With `-t <branch>` option, instead of the default glob
40 refspec for the remote to track all branches under
41 `$GIT_DIR/remotes/<name>/`, a refspec to track only `<branch>`
42 is created.  You can give more than one `-t <branch>` to track
43 multiple branches without grabbing all branches.
45 With `-m <master>` option, `$GIT_DIR/remotes/<name>/HEAD` is set
46 up to point at remote's `<master>` branch instead of whatever
47 branch the `HEAD` at the remote repository actually points at.
49 'show'::
51 Gives some information about the remote <name>.
53 With `-n` option, the remote heads are not queried first with
54 `git ls-remote <name>`; cached information is used instead.
56 'prune'::
58 Deletes all stale tracking branches under <name>.
59 These stale branches have already been removed from the remote repository
60 referenced by <name>, but are still locally available in
61 "remotes/<name>".
63 With `-n` option, the remote heads are not confirmed first with `git
64 ls-remote <name>`; cached information is used instead.  Use with
65 caution.
67 'update'::
69 Fetch updates for a named set of remotes in the repository as defined by
70 remotes.<group>.  If a named group is not specified on the command line,
71 the configuration parameter remotes.default will get used; if
72 remotes.default is not defined, all remotes which do not the
73 configuration parameter remote.<name>.skipDefaultUpdate set to true will
74 be updated.  (See gitlink:git-config[1]).
77 DISCUSSION
78 ----------
80 The remote configuration is achieved using the `remote.origin.url` and
81 `remote.origin.fetch` configuration variables.  (See
82 gitlink:git-config[1]).
84 Examples
85 --------
87 * Add a new remote, fetch, and check out a branch from it
89 ------------
90 $ git remote
91 origin
92 $ git branch -r
93 origin/master
94 $ git remote add linux-nfs git://linux-nfs.org/pub/nfs-2.6.git
95 $ git remote
96 linux-nfs
97 origin
98 $ git fetch
99 * refs/remotes/linux-nfs/master: storing branch 'master' ...
100   commit: bf81b46
101 $ git branch -r
102 origin/master
103 linux-nfs/master
104 $ git checkout -b nfs linux-nfs/master
106 ------------
108 * Imitate 'git clone' but track only selected branches
110 ------------
111 $ mkdir project.git
112 $ cd project.git
113 $ git init
114 $ git remote add -f -t master -m master origin git://example.com/git.git/
115 $ git merge origin
116 ------------
119 See Also
120 --------
121 gitlink:git-fetch[1]
122 gitlink:git-branch[1]
123 gitlink:git-config[1]
125 Author
126 ------
127 Written by Junio Hamano
130 Documentation
131 --------------
132 Documentation by J. Bruce Fields and the git-list <git@vger.kernel.org>.
137 Part of the gitlink:git[7] suite