···8899SYNOPSIS
1010--------
1111-'git pull' <options> <repository> <refspec>...
1111+'git pull' [options] [<repository> [<refspec>...]]
121213131414DESCRIPTION
1515-----------
1616-Runs 'git fetch' with the given parameters, and calls 'git merge'
1717-to merge the retrieved head(s) into the current branch.
1818-With `--rebase`, calls 'git rebase' instead of 'git merge'.
1616+1717+Incorporates changes from a remote repository into the current
1818+branch. In its default mode, `git pull` is shorthand for
1919+`git fetch` followed by `git merge FETCH_HEAD`.
2020+2121+More precisely, 'git pull' runs 'git fetch' with the given
2222+parameters and calls 'git merge' to merge the retrieved branch
2323+heads into the current branch.
2424+With `--rebase`, it runs 'git rebase' instead of 'git merge'.
2525+2626+<repository> should be the name of a remote repository as
2727+passed to linkgit:git-fetch[1]. <refspec> can name an
2828+arbitrary remote ref (for example, the name of a tag) or even
2929+a collection of refs with corresponding remote tracking branches
3030+(e.g., refs/heads/*:refs/remotes/origin/*), but usually it is
3131+the name of a branch in the remote repository.
3232+3333+Default values for <repository> and <branch> are read from the
3434+"remote" and "merge" configuration for the current branch
3535+as set by linkgit:git-branch[1] `--track`.
3636+3737+Assume the following history exists and the current branch is
3838+"`master`":
3939+4040+------------
4141+ A---B---C master on origin
4242+ /
4343+ D---E---F---G master
4444+------------
4545+4646+Then "`git pull`" will fetch and replay the changes from the remote
4747+`master` branch since it diverged from the local `master` (i.e., `E`)
4848+until its current commit (`C`) on top of `master` and record the
4949+result in a new commit along with the names of the two parent commits
5050+and a log message from the user describing the changes.
19512020-Note that you can use `.` (current directory) as the
2121-<repository> to pull from the local repository -- this is useful
2222-when merging local branches into the current branch.
5252+------------
5353+ A---B---C remotes/origin/master
5454+ / \
5555+ D---E---F---G---H master
5656+------------
23572424-Also note that options meant for 'git pull' itself and underlying
2525-'git merge' must be given before the options meant for 'git fetch'.
5858+See linkgit:git-merge[1] for details, including how conflicts
5959+are presented and handled.
26602727-*Warning*: Running 'git pull' (actually, the underlying 'git merge')
6161+In git 1.7.0 or later, to cancel a conflicting merge, use
6262+`git reset --merge`. *Warning*: In older versions of git, running 'git pull'
2863with uncommitted changes is discouraged: while possible, it leaves you
2929-in a state that is hard to back out of in the case of a conflict.
6464+in a state that may be hard to back out of in the case of a conflict.
6565+6666+If any of the remote changes overlap with local uncommitted changes,
6767+the merge will be automatically cancelled and the work tree untouched.
6868+It is generally best to get any local changes in working order before
6969+pulling or stash them away with linkgit:git-stash[1].
30703171OPTIONS
3272-------
7373+7474+Options meant for 'git pull' itself and the underlying 'git merge'
7575+must be given before the options meant for 'git fetch'.
33763477-q::
3578--quiet::