Documentation / git-pull.txton commit Allow the user to control the verbosity of merge-recursive. (8c3275a)
   1git-pull(1)
   2===========
   3
   4NAME
   5----
   6git-pull - Pull and merge from another repository or a local branch
   7
   8
   9SYNOPSIS
  10--------
  11'git-pull' <options> <repository> <refspec>...
  12
  13
  14DESCRIPTION
  15-----------
  16Runs `git-fetch` with the given parameters, and calls `git-merge`
  17to merge the retrieved head(s) into the current branch.
  18
  19Note that you can use `.` (current directory) as the
  20<repository> to pull from the local repository -- this is useful
  21when merging local branches into the current branch.
  22
  23
  24OPTIONS
  25-------
  26include::merge-options.txt[]
  27
  28include::fetch-options.txt[]
  29
  30include::pull-fetch-param.txt[]
  31
  32include::urls.txt[]
  33
  34include::merge-strategies.txt[]
  35
  36EXAMPLES
  37--------
  38
  39git pull, git pull origin::
  40        Update the remote-tracking branches for the repository
  41        you cloned from, then merge one of them into your
  42        current branch.  Normally the branch merged in is
  43        the HEAD of the remote repository, but the choice is
  44        determined by the branch.<name>.remote and
  45        branch.<name>.merge options; see gitlink:git-repo-config[1]
  46        for details.
  47
  48git pull origin next::
  49        Merge into the current branch the remote branch `next`;
  50        leaves a copy of `next` temporarily in FETCH_HEAD, but
  51        does not update any remote-tracking branches.
  52
  53git pull . fixes enhancements::
  54        Bundle local branch `fixes` and `enhancements` on top of
  55        the current branch, making an Octopus merge.
  56
  57git pull -s ours . obsolete::
  58        Merge local branch `obsolete` into the current branch,
  59        using `ours` merge strategy.
  60
  61git pull --no-commit . maint::
  62        Merge local branch `maint` into the current branch, but
  63        do not make a commit automatically.  This can be used
  64        when you want to include further changes to the merge,
  65        or want to write your own merge commit message.
  66+
  67You should refrain from abusing this option to sneak substantial
  68changes into a merge commit.  Small fixups like bumping
  69release/version name would be acceptable.
  70
  71Command line pull of multiple branches from one repository::
  72+
  73------------------------------------------------
  74$ git checkout master
  75$ git fetch origin +pu:pu maint:tmp
  76$ git pull . tmp
  77------------------------------------------------
  78+
  79This updates (or creates, as necessary) branches `pu` and `tmp`
  80in the local repository by fetching from the branches
  81(respectively) `pu` and `maint` from the remote repository.
  82+
  83The `pu` branch will be updated even if it is does not
  84fast-forward; the others will not be.
  85+
  86The final command then merges the newly fetched `tmp` into master.
  87
  88
  89If you tried a pull which resulted in a complex conflicts and
  90would want to start over, you can recover with
  91gitlink:git-reset[1].
  92
  93
  94SEE ALSO
  95--------
  96gitlink:git-fetch[1], gitlink:git-merge[1], gitlink:git-repo-config[1]
  97
  98
  99Author
 100------
 101Written by Linus Torvalds <torvalds@osdl.org>
 102and Junio C Hamano <junkio@cox.net>
 103
 104Documentation
 105--------------
 106Documentation by Jon Loeliger,
 107David Greaves,
 108Junio C Hamano and the git-list <git@vger.kernel.org>.
 109
 110GIT
 111---
 112Part of the gitlink:git[7] suite
 113