Skip excessive blank lines before commit body
[git/dscho.git] / Documentation / git-pull.txt
blob13be992006d8252ca737e37dd21ed8f2d1e13412
1 git-pull(1)
2 ===========
4 NAME
5 ----
6 git-pull - Pull and merge from another repository or a local branch
9 SYNOPSIS
10 --------
11 'git-pull' <options> <repository> <refspec>...
14 DESCRIPTION
15 -----------
16 Runs `git-fetch` with the given parameters, and calls `git-merge`
17 to merge the retrieved head(s) into the current branch.
19 Note that you can use `.` (current directory) as the
20 <repository> to pull from the local repository -- this is useful
21 when merging local branches into the current branch.
24 OPTIONS
25 -------
26 include::merge-options.txt[]
28 include::fetch-options.txt[]
30 include::pull-fetch-param.txt[]
32 include::urls.txt[]
34 include::merge-strategies.txt[]
36 EXAMPLES
37 --------
39 git 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.
48 git 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.
53 git pull . fixes enhancements::
54         Bundle local branch `fixes` and `enhancements` on top of
55         the current branch, making an Octopus merge.
57 git pull -s ours . obsolete::
58         Merge local branch `obsolete` into the current branch,
59         using `ours` merge strategy.
61 git 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.
67 You should refrain from abusing this option to sneak substantial
68 changes into a merge commit.  Small fixups like bumping
69 release/version name would be acceptable.
71 Command line pull of multiple branches from one repository::
73 ------------------------------------------------
74 $ git checkout master
75 $ git fetch origin +pu:pu maint:tmp
76 $ git pull . tmp
77 ------------------------------------------------
79 This updates (or creates, as necessary) branches `pu` and `tmp`
80 in the local repository by fetching from the branches
81 (respectively) `pu` and `maint` from the remote repository.
83 The `pu` branch will be updated even if it is does not
84 fast-forward; the others will not be.
86 The final command then merges the newly fetched `tmp` into master.
89 If you tried a pull which resulted in a complex conflicts and
90 would want to start over, you can recover with
91 gitlink:git-reset[1].
94 SEE ALSO
95 --------
96 gitlink:git-fetch[1], gitlink:git-merge[1], gitlink:git-repo-config[1]
99 Author
100 ------
101 Written by Linus Torvalds <torvalds@osdl.org>
102 and Junio C Hamano <junkio@cox.net>
104 Documentation
105 --------------
106 Documentation by Jon Loeliger,
107 David Greaves,
108 Junio C Hamano and the git-list <git@vger.kernel.org>.
112 Part of the gitlink:git[7] suite