.\" ** You probably do not want to edit this file directly ** .\" It was generated using the DocBook XSL Stylesheets (version 1.69.1). .\" Instead of manually editing it, you probably should edit the DocBook XML .\" source for it and then use the DocBook XSL Stylesheets to regenerate it. .TH "GIT\-REMOTE" "1" "09/19/2007" "Git 1.5.3.2" "Git Manual" .\" disable hyphenation .nh .\" disable justification (adjust text to left margin only) .ad l .SH "NAME" git\-remote \- manage set of tracked repositories .SH "SYNOPSIS" .sp .nf \fIgit\-remote\fR \fIgit\-remote\fR add [\-t ] [\-m ] [\-f] \fIgit\-remote\fR show \fIgit\-remote\fR prune \fIgit\-remote\fR update [group] .fi .SH "DESCRIPTION" Manage the set of repositories ("remotes") whose branches you track. .SH "COMMANDS" With no arguments, shows a list of existing remotes. Several subcommands are available to perform operations on the remotes. .TP \fIadd\fR Adds a remote named for the repository at . The command git fetch can then be used to create and update remote\-tracking branches /. With \-f option, git fetch is run immediately after the remote information is set up. With \-t option, instead of the default glob refspec for the remote to track all branches under $GIT_DIR/remotes//, a refspec to track only is created. You can give more than one \-t to track multiple branches without grabbing all branches. With \-m option, $GIT_DIR/remotes//HEAD is set up to point at remote's branch instead of whatever branch the HEAD at the remote repository actually points at. .TP \fIshow\fR Gives some information about the remote . With \-n option, the remote heads are not queried first with git ls\-remote ; cached information is used instead. .TP \fIprune\fR Deletes all stale tracking branches under . These stale branches have already been removed from the remote repository referenced by , but are still locally available in "remotes/". With \-n option, the remote heads are not confirmed first with git ls\-remote ; cached information is used instead. Use with caution. .TP \fIupdate\fR Fetch updates for a named set of remotes in the repository as defined by remotes.. If a named group is not specified on the command line, the configuration parameter remotes.default will get used; if remotes.default is not defined, all remotes which do not the configuration parameter remote..skipDefaultUpdate set to true will be updated. (See \fBgit\-config\fR(1)). .SH "DISCUSSION" The remote configuration is achieved using the remote.origin.url and remote.origin.fetch configuration variables. (See \fBgit\-config\fR(1)). .SH "EXAMPLES" .TP 3 \(bu Add a new remote, fetch, and check out a branch from it .sp .nf .ft C $ git remote origin $ git branch \-r origin/master $ git remote add linux\-nfs git://linux\-nfs.org/pub/nfs\-2.6.git $ git remote linux\-nfs origin $ git fetch * refs/remotes/linux\-nfs/master: storing branch 'master' ... commit: bf81b46 $ git branch \-r origin/master linux\-nfs/master $ git checkout \-b nfs linux\-nfs/master ... .ft .fi .TP \(bu Imitate \fIgit clone\fR but track only selected branches .sp .nf .ft C $ mkdir project.git $ cd project.git $ git init $ git remote add \-f \-t master \-m master origin git://example.com/git.git/ $ git merge origin .ft .fi .SH "SEE ALSO" \fBgit\-fetch\fR(1) \fBgit\-branch\fR(1) \fBgit\-config\fR(1) .SH "AUTHOR" Written by Junio Hamano .SH "DOCUMENTATION" Documentation by J. Bruce Fields and the git\-list . .SH "GIT" Part of the \fBgit\fR(7) suite