1 <!DOCTYPE html PUBLIC
"-//W3C//DTD XHTML 1.1//EN"
2 "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
3 <html xmlns=
"http://www.w3.org/1999/xhtml" xml:
lang=
"en">
5 <meta http-equiv=
"Content-Type" content=
"text/html; charset=UTF-8" />
6 <meta name=
"generator" content=
"AsciiDoc 8.2.5" />
7 <style type=
"text/css">
9 p
, li
, dt
, dd
, div
, pre
, h1
, h2
, h3
, h4
, h5
, h6
{
11 border: 1px solid red;
16 margin: 1em 5% 1em 5%;
21 text-decoration: underline
;
39 h1
, h2
, h3
, h4
, h5
, h6
{
41 font-family: sans-serif
;
48 border-bottom: 2px solid silver
;
66 border: 1px solid silver
;
81 font-family: sans-serif
;
88 font-family: sans-serif
;
92 font-family: sans-serif
;
94 border-top: 2px solid silver
;
100 padding-bottom: 0.5em;
104 padding-bottom: 0.5em;
108 div
.tableblock
, div
.imageblock
, div
.exampleblock
, div
.verseblock
,
109 div
.quoteblock
, div
.literalblock
, div
.listingblock
, div
.sidebarblock
,
110 div
.admonitionblock
{
113 margin-bottom: 1.5em;
115 div
.admonitionblock
{
117 margin-bottom: 2.5em;
120 div
.content
{ /* Block element content. */
124 /* Block element titles. */
125 div
.title
, caption
.title
{
126 font-family: sans-serif
;
130 margin-bottom: 0.5em;
136 td div
.title:first-child
{
139 div
.content div
.title:first-child
{
142 div
.content
+ div
.title
{
146 div
.sidebarblock
> div
.content
{
148 border: 1px solid silver
;
155 div
.listingblock
> div
.content
{
156 border: 1px solid silver
;
161 div
.quoteblock
> div
.content
{
168 div
.verseblock
+ div
.attribution
{
172 div
.admonitionblock
.icon
{
176 text-decoration: underline
;
178 padding-right: 0.5em;
180 div
.admonitionblock td
.content
{
182 border-left: 2px solid silver
;
185 div
.exampleblock
> div
.content
{
186 border-left: 2px solid silver
;
190 div
.verseblock div
.content
{
194 div
.imageblock div
.content
{ padding-left: 0; }
195 div
.imageblock img
{ border: 1px solid silver
; }
196 span
.image img
{ border-style: none
; }
200 margin-bottom: 0.8em;
212 list-style-position: outside
;
215 list-style-type: lower-alpha
;
218 div
.tableblock
> table
{
219 border: 3px solid
#527bbd;
222 font-family: sans-serif
;
231 margin-bottom: 0.8em;
239 padding-right: 0.8em;
246 div#footer-badges
{ display: none
; }
251 font-family: sans-serif
;
255 margin-bottom: 0.1em;
258 div
.toclevel1
, div
.toclevel2
, div
.toclevel3
, div
.toclevel4
{
274 include1::./stylesheets
/xhtml11-manpage
.css
[]
275 /* Workarounds for IE6's broken and incomplete CSS2. */
277 div
.sidebar-content
{
279 border: 1px solid silver
;
282 div
.sidebar-title
, div
.image-title
{
283 font-family: sans-serif
;
286 margin-bottom: 0.5em;
289 div
.listingblock div
.content
{
290 border: 1px solid silver
;
295 div
.quoteblock-content
{
299 div
.exampleblock-content
{
300 border-left: 2px solid silver
;
304 /* IE6 sets dynamically generated links as visited. */
305 div#toc
a:visited
{ color: blue
; }
307 <title>git-pull(
1)
</title>
312 git-pull(
1) Manual Page
315 <div class=
"sectionbody">
317 Fetch from and merge with another repository or a local branch
322 <div class=
"sectionbody">
323 <div class=
"para"><p><em>git pull
</em> <options
> <repository
> <refspec
>…</p></div>
325 <h2 id=
"_description">DESCRIPTION
</h2>
326 <div class=
"sectionbody">
327 <div class=
"para"><p>Runs
<em>git-fetch
</em> with the given parameters, and calls
<em>git-merge
</em>
328 to merge the retrieved head(s) into the current branch.
329 With
<tt>--rebase
</tt>, calls
<em>git-rebase
</em> instead of
<em>git-merge
</em>.
</p></div>
330 <div class=
"para"><p>Note that you can use
<tt>.
</tt> (current directory) as the
331 <repository
> to pull from the local repository
— this is useful
332 when merging local branches into the current branch.
</p></div>
333 <div class=
"para"><p>Also note that options meant for
<em>git-pull
</em> itself and underlying
334 <em>git-merge
</em> must be given before the options meant for
<em>git-fetch
</em>.
</p></div>
336 <h2 id=
"_options">OPTIONS
</h2>
337 <div class=
"sectionbody">
338 <div class=
"vlist"><dl>
366 Show a diffstat at the end of the merge. The diffstat is also
367 controlled by the configuration option merge.stat.
378 Do not show a diffstat at the end of the merge.
389 Synonyms to --stat and --no-stat; these are deprecated and will be
390 removed in the future.
398 In addition to branch names, populate the log message with
399 one-line descriptions from the actual commits that are being
408 Do not list one-line descriptions from the actual commits being
417 Perform the merge but pretend the merge failed and do
418 not autocommit, to give the user a chance to inspect and
419 further tweak the merge result before committing.
427 Perform the merge and commit the result. This option can
428 be used to override --no-commit.
436 Produce the working tree and index state as if a real
437 merge happened (except for the merge information),
438 but do not actually make a commit or
439 move the
<tt>HEAD
</tt>, nor record
<tt>$GIT_DIR/MERGE_HEAD
</tt> to
440 cause the next
<tt>git commit
</tt> command to create a merge
441 commit. This allows you to create a single commit on
442 top of the current branch whose effect is the same as
443 merging another branch (or more in case of an octopus).
451 Perform the merge and commit the result. This option can
452 be used to override --squash.
460 Generate a merge commit even if the merge resolved as a
469 Do not generate a merge commit if the merge resolved as
470 a fast-forward, only update the branch pointer. This is
471 the default behavior of git-merge.
478 --strategy=
<strategy
>
482 Use the given merge strategy; can be supplied more than
483 once to specify them in the order they should be tried.
484 If there is no
<tt>-s
</tt> option, a built-in list of strategies
485 is used instead (
<em>git-merge-recursive
</em> when merging a single
486 head,
<em>git-merge-octopus
</em> otherwise).
490 <div class=
"vlist"><dl>
496 Instead of a merge, perform a rebase after fetching. If
497 there is a remote ref for the upstream branch, and this branch
498 was rebased since last fetched, the rebase uses that information
499 to avoid rebasing non-local changes. To make this the default
500 for branch
<tt><name
></tt>, set configuration
<tt>branch.
<name
>.rebase
</tt>
503 <div class=
"admonitionblock">
506 <div class=
"title">Note
</div>
508 <td class=
"content">This is a potentially _dangerous_ mode of operation.
509 It rewrites history, which does not bode well when you
510 published that history already. Do
<strong>not
</strong> use this option
511 unless you have read
<a href=
"git-rebase.html">git-rebase(
1)
</a> carefully.
</td>
520 Override earlier --rebase.
531 Pass --quiet to git-fetch-pack and silence any other internally
554 Append ref names and object names of fetched refs to the
555 existing contents of
<tt>.git/FETCH_HEAD
</tt>. Without this
556 option old data in
<tt>.git/FETCH_HEAD
</tt> will be overwritten.
560 --upload-pack
<upload-pack
>
564 When given, and the repository to fetch from is handled
565 by
<em>git-fetch-pack
</em>,
<em>--exec=
<upload-pack
></em> is passed to
566 the command to specify non-default path for the command
567 run on the other end.
578 When
<em>git-fetch
</em> is used with
<tt><rbranch
>:
<lbranch
></tt>
579 refspec, it refuses to update the local branch
580 <tt><lbranch
></tt> unless the remote branch
<tt><rbranch
></tt> it
581 fetches is a descendant of
<tt><lbranch
></tt>. This option
582 overrides that check.
590 By default, tags that point at objects that are downloaded
591 from the remote repository are fetched and stored locally.
592 This option disables this automatic tag following.
603 Most of the tags are fetched automatically as branch
604 heads are downloaded, but tags that do not point at
605 objects reachable from the branch heads that are being
606 tracked will not be fetched by this mechanism. This
607 flag lets all tags and their associated objects be
619 Keep downloaded pack.
630 By default
<em>git-fetch
</em> refuses to update the head which
631 corresponds to the current branch. This flag disables the
632 check. This is purely for the internal use for
<em>git-pull
</em>
633 to communicate with
<em>git-fetch
</em>, and unless you are
634 implementing your own Porcelain you are not supposed to
639 --depth=
<depth
>
643 Deepen the history of a
<em>shallow
</em> repository created by
644 <tt>git clone
</tt> with
<tt>--depth=
<depth
></tt> option (see
<a href=
"git-clone.html">git-clone(
1)
</a>)
645 by the specified number of commits.
653 The
"remote" repository that is the source of a fetch
654 or pull operation. This parameter can be either a URL
655 (see the section
<a href=
"#URLS">GIT URLS
</a> below) or the name
656 of a remote (see the section
<a href=
"#REMOTES">REMOTES
</a> below).
664 The format of a
<refspec
> parameter is an optional plus
665 <tt>+</tt>, followed by the source ref
<src
>, followed
666 by a colon
<tt>:
</tt>, followed by the destination ref
<dst
>.
668 <div class=
"para"><p>The remote ref that matches
<src
>
669 is fetched, and if
<dst
> is not empty string, the local
670 ref that matches it is fast forwarded using
<src
>.
671 If the optional plus
<tt>+
</tt> is used, the local ref
672 is updated even if it does not result in a fast forward
674 <div class=
"admonitionblock">
677 <div class=
"title">Note
</div>
679 <td class=
"content">If the remote branch from which you want to pull is
680 modified in non-linear ways such as being rewound and
681 rebased frequently, then a pull will attempt a merge with
682 an older version of itself, likely conflict, and fail.
683 It is under these conditions that you would want to use
684 the
<tt>+
</tt> sign to indicate non-fast-forward updates will
685 be needed. There is currently no easy way to determine
686 or declare that a branch will be made available in a
687 repository with this behavior; the pulling user simply
688 must know this is the expected usage pattern for a branch.
</td>
691 <div class=
"admonitionblock">
694 <div class=
"title">Note
</div>
696 <td class=
"content">You never do your own development on branches that appear
697 on the right hand side of a
<refspec
> colon on
<tt>Pull:
</tt> lines;
698 they are to be updated by
<em>git-fetch
</em>. If you intend to do
699 development derived from a remote branch
<tt>B
</tt>, have a
<tt>Pull:
</tt>
700 line to track it (i.e.
<tt>Pull: B:remote-B
</tt>), and have a separate
701 branch
<tt>my-B
</tt> to do your development on top of it. The latter
702 is created by
<tt>git branch my-B remote-B
</tt> (or its equivalent
<tt>git
703 checkout -b my-B remote-B
</tt>). Run
<tt>git fetch
</tt> to keep track of
704 the progress of the remote side, and when you see something new
705 on the remote branch, merge it into your development branch with
706 <tt>git pull . remote-B
</tt>, while you are on
<tt>my-B
</tt> branch.
</td>
709 <div class=
"admonitionblock">
712 <div class=
"title">Note
</div>
714 <td class=
"content">There is a difference between listing multiple
<refspec
>
715 directly on
<em>git-pull
</em> command line and having multiple
716 <tt>Pull:
</tt> <refspec
> lines for a
<repository
> and running
717 <em>git-pull
</em> command without any explicit
<refspec
> parameters.
718 <refspec
> listed explicitly on the command line are always
719 merged into the current branch after fetching. In other words,
720 if you list more than one remote refs, you would be making
721 an Octopus. While
<em>git-pull
</em> run without any explicit
<refspec
>
722 parameter takes default
<refspec
>s from
<tt>Pull:
</tt> lines, it
723 merges only the first
<refspec
> found into the current branch,
724 after fetching all the remote refs. This is because making an
725 Octopus from remote refs is rarely done, while keeping track
726 of multiple remote heads in one-go by fetching more than one
727 is often useful.
</td>
730 <div class=
"para"><p>Some short-cut notations are also supported.
</p></div>
731 <div class=
"ilist"><ul>
734 <tt>tag
<tag
></tt> means the same as
<tt>refs/tags/
<tag
>:refs/tags/
<tag
></tt>;
735 it requests fetching everything up to the given tag.
740 A parameter
<ref
> without a colon is equivalent to
741 <ref
>: when pulling/fetching, so it merges
<ref
> into the current
742 branch without storing the remote branch anywhere locally
749 <h2 id=
"_git_urls_a_id_urls_a">GIT URLS
<a id=
"URLS"></a></h2>
750 <div class=
"sectionbody">
751 <div class=
"para"><p>One of the following notations can be used
752 to name the remote repository:
</p></div>
753 <div class=
"exampleblock">
754 <div class=
"exampleblock-content">
755 <div class=
"ilist"><ul>
758 rsync://host.xz/path/to/repo.git/
763 http://host.xz
[:port
]/path/to/repo.git/
768 https://host.xz
[:port
]/path/to/repo.git/
773 git://host.xz
[:port
]/path/to/repo.git/
778 git://host.xz
[:port
]/~user/path/to/repo.git/
783 ssh://
[user@
]host.xz
[:port
]/path/to/repo.git/
788 ssh://
[user@
]host.xz/path/to/repo.git/
793 ssh://
[user@
]host.xz/~user/path/to/repo.git/
798 ssh://
[user@
]host.xz/~/path/to/repo.git
803 <div class=
"para"><p>SSH is the default transport protocol over the network. You can
804 optionally specify which user to log-in as, and an alternate,
805 scp-like syntax is also supported. Both syntaxes support
806 username expansion, as does the native git protocol, but
807 only the former supports port specification. The following
808 three are identical to the last three above, respectively:
</p></div>
809 <div class=
"exampleblock">
810 <div class=
"exampleblock-content">
811 <div class=
"ilist"><ul>
814 [user@
]host.xz:/path/to/repo.git/
819 [user@
]host.xz:~user/path/to/repo.git/
824 [user@
]host.xz:path/to/repo.git
829 <div class=
"para"><p>To sync with a local directory, you can use:
</p></div>
830 <div class=
"exampleblock">
831 <div class=
"exampleblock-content">
832 <div class=
"ilist"><ul>
840 file:///path/to/repo.git/
845 <div class=
"para"><p>They are mostly equivalent, except when cloning. See
846 <a href=
"git-clone.html">git-clone(
1)
</a> for details.
</p></div>
847 <div class=
"para"><p>If there are a large number of similarly-named remote repositories and
848 you want to use a different format for them (such that the URLs you
849 use will be rewritten into URLs that work), you can create a
850 configuration section of the form:
</p></div>
851 <div class=
"listingblock">
852 <div class=
"content">
853 <pre><tt> [url
"<actual url base>"]
854 insteadOf =
<other url base
></tt></pre>
856 <div class=
"para"><p>For example, with this:
</p></div>
857 <div class=
"listingblock">
858 <div class=
"content">
859 <pre><tt> [url
"git://git.host.xz/"]
860 insteadOf = host.xz:/path/to/
861 insteadOf = work:
</tt></pre>
863 <div class=
"para"><p>a URL like
"work:repo.git" or like
"host.xz:/path/to/repo.git" will be
864 rewritten in any context that takes a URL to be
"git://git.host.xz/repo.git".
</p></div>
866 <h2 id=
"_remotes_a_id_remotes_a">REMOTES
<a id=
"REMOTES"></a></h2>
867 <div class=
"sectionbody">
868 <div class=
"para"><p>The name of one of the following can be used instead
869 of a URL as
<tt><repository
></tt> argument:
</p></div>
870 <div class=
"ilist"><ul>
873 a remote in the git configuration file:
<tt>$GIT_DIR/config
</tt>,
878 a file in the
<tt>$GIT_DIR/remotes
</tt> directory, or
883 a file in the
<tt>$GIT_DIR/branches
</tt> directory.
887 <div class=
"para"><p>All of these also allow you to omit the refspec from the command line
888 because they each contain a refspec which git will use by default.
</p></div>
889 <h3 id=
"_named_remote_in_configuration_file">Named remote in configuration file
</h3><div style=
"clear:left"></div>
890 <div class=
"para"><p>You can choose to provide the name of a remote which you had previously
891 configured using
<a href=
"git-remote.html">git-remote(
1)
</a>,
<a href=
"git-config.html">git-config(
1)
</a>
892 or even by a manual edit to the
<tt>$GIT_DIR/config
</tt> file. The URL of
893 this remote will be used to access the repository. The refspec
894 of this remote will be used by default when you do
895 not provide a refspec on the command line. The entry in the
896 config file would appear like this:
</p></div>
897 <div class=
"listingblock">
898 <div class=
"content">
899 <pre><tt> [remote
"<name>"]
901 push =
<refspec
>
902 fetch =
<refspec
></tt></pre>
904 <h3 id=
"_named_file_in_tt_git_dir_remotes_tt">Named file in
<tt>$GIT_DIR/remotes
</tt></h3><div style=
"clear:left"></div>
905 <div class=
"para"><p>You can choose to provide the name of a
906 file in
<tt>$GIT_DIR/remotes
</tt>. The URL
907 in this file will be used to access the repository. The refspec
908 in this file will be used as default when you do not
909 provide a refspec on the command line. This file should have the
910 following format:
</p></div>
911 <div class=
"listingblock">
912 <div class=
"content">
913 <pre><tt> URL: one of the above URL format
914 Push:
<refspec
>
915 Pull:
<refspec
>
918 <div class=
"para"><p><tt>Push:
</tt> lines are used by
<em>git-push
</em> and
919 <tt>Pull:
</tt> lines are used by
<em>git-pull
</em> and
<em>git-fetch
</em>.
920 Multiple
<tt>Push:
</tt> and
<tt>Pull:
</tt> lines may
921 be specified for additional branch mappings.
</p></div>
922 <h3 id=
"_named_file_in_tt_git_dir_branches_tt">Named file in
<tt>$GIT_DIR/branches
</tt></h3><div style=
"clear:left"></div>
923 <div class=
"para"><p>You can choose to provide the name of a
924 file in
<tt>$GIT_DIR/branches
</tt>.
925 The URL in this file will be used to access the repository.
926 This file should have the following format:
</p></div>
927 <div class=
"listingblock">
928 <div class=
"content">
929 <pre><tt> <url
>#
<head
></tt></pre>
931 <div class=
"para"><p><tt><url
></tt> is required;
<tt>#
<head
></tt> is optional.
</p></div>
932 <div class=
"para"><p>Depending on the operation, git will use one of the following
933 refspecs, if you don't provide one on the command line.
934 <tt><branch
></tt> is the name of this file in
<tt>$GIT_DIR/branches
</tt> and
935 <tt><head
></tt> defaults to
<tt>master
</tt>.
</p></div>
936 <div class=
"para"><p>git fetch uses:
</p></div>
937 <div class=
"listingblock">
938 <div class=
"content">
939 <pre><tt> refs/heads/
<head
>:refs/heads/
<branch
></tt></pre>
941 <div class=
"para"><p>git push uses:
</p></div>
942 <div class=
"listingblock">
943 <div class=
"content">
944 <pre><tt> HEAD:refs/heads/
<head
></tt></pre>
947 <h2 id=
"_merge_strategies">MERGE STRATEGIES
</h2>
948 <div class=
"sectionbody">
949 <div class=
"vlist"><dl>
955 This can only resolve two heads (i.e. the current branch
956 and another branch you pulled from) using a
3-way merge
957 algorithm. It tries to carefully detect criss-cross
958 merge ambiguities and is considered generally safe and
967 This can only resolve two heads using a
3-way merge
968 algorithm. When there is more than one common
969 ancestor that can be used for
3-way merge, it creates a
970 merged tree of the common ancestors and uses that as
971 the reference tree for the
3-way merge. This has been
972 reported to result in fewer merge conflicts without
973 causing mis-merges by tests done on actual merge commits
974 taken from Linux
2.6 kernel development history.
975 Additionally this can detect and handle merges involving
976 renames. This is the default merge strategy when
977 pulling or merging one branch.
985 This resolves cases with more than two heads, but refuses to do
986 a complex merge that needs manual resolution. It is
987 primarily meant to be used for bundling topic branch
988 heads together. This is the default merge strategy when
989 pulling or merging more than one branch.
997 This resolves any number of heads, but the result of the
998 merge is always the current branch head. It is meant to
999 be used to supersede old development history of side
1008 This is a modified recursive strategy. When merging trees A and
1009 B, if B corresponds to a subtree of A, B is first adjusted to
1010 match the tree structure of A, instead of reading the trees at
1011 the same level. This adjustment is also done to the common
1017 <h2 id=
"_default_behaviour">DEFAULT BEHAVIOUR
</h2>
1018 <div class=
"sectionbody">
1019 <div class=
"para"><p>Often people use
<tt>git pull
</tt> without giving any parameter.
1020 Traditionally, this has been equivalent to saying
<tt>git pull
1021 origin
</tt>. However, when configuration
<tt>branch.
<name
>.remote
</tt> is
1022 present while on branch
<tt><name
></tt>, that value is used instead of
1023 <tt>origin
</tt>.
</p></div>
1024 <div class=
"para"><p>In order to determine what URL to use to fetch from, the value
1025 of the configuration
<tt>remote.
<origin
>.url
</tt> is consulted
1026 and if there is not any such variable, the value on
<tt>URL:
</tt> line
1027 in
<tt>$GIT_DIR/remotes/
<origin
></tt> file is used.
</p></div>
1028 <div class=
"para"><p>In order to determine what remote branches to fetch (and
1029 optionally store in the tracking branches) when the command is
1030 run without any refspec parameters on the command line, values
1031 of the configuration variable
<tt>remote.
<origin
>.fetch
</tt> are
1032 consulted, and if there aren't any,
<tt>$GIT_DIR/remotes/
<origin
></tt>
1033 file is consulted and its
<tt>Pull:
</tt> lines are used.
1034 In addition to the refspec formats described in the OPTIONS
1035 section, you can have a globbing refspec that looks like this:
</p></div>
1036 <div class=
"listingblock">
1037 <div class=
"content">
1038 <pre><tt>refs/heads/*:refs/remotes/origin/*
</tt></pre>
1040 <div class=
"para"><p>A globbing refspec must have a non-empty RHS (i.e. must store
1041 what were fetched in tracking branches), and its LHS and RHS
1042 must end with
<tt>/*
</tt>. The above specifies that all remote
1043 branches are tracked using tracking branches in
1044 <tt>refs/remotes/origin/
</tt> hierarchy under the same name.
</p></div>
1045 <div class=
"para"><p>The rule to determine which remote branch to merge after
1046 fetching is a bit involved, in order not to break backward
1047 compatibility.
</p></div>
1048 <div class=
"para"><p>If explicit refspecs were given on the command
1049 line of
<tt>git pull
</tt>, they are all merged.
</p></div>
1050 <div class=
"para"><p>When no refspec was given on the command line, then
<tt>git pull
</tt>
1051 uses the refspec from the configuration or
1052 <tt>$GIT_DIR/remotes/
<origin
></tt>. In such cases, the following
1053 rules apply:
</p></div>
1054 <div class=
"olist"><ol>
1057 If
<tt>branch.
<name
>.merge
</tt> configuration for the current
1058 branch
<tt><name
></tt> exists, that is the name of the branch at the
1059 remote site that is merged.
1064 If the refspec is a globbing one, nothing is merged.
1069 Otherwise the remote branch of the first refspec is merged.
1074 <h2 id=
"_examples">EXAMPLES
</h2>
1075 <div class=
"sectionbody">
1076 <div class=
"ilist"><ul>
1079 Update the remote-tracking branches for the repository
1080 you cloned from, then merge one of them into your
1083 <div class=
"listingblock">
1084 <div class=
"content">
1085 <pre><tt>$ git pull, git pull origin
</tt></pre>
1087 <div class=
"para"><p>Normally the branch merged in is the HEAD of the remote repository,
1088 but the choice is determined by the branch.
<name
>.remote and
1089 branch.
<name
>.merge options; see
<a href=
"git-config.html">git-config(
1)
</a> for details.
</p></div>
1093 Merge into the current branch the remote branch
<tt>next
</tt>:
1095 <div class=
"listingblock">
1096 <div class=
"content">
1097 <pre><tt>$ git pull origin next
</tt></pre>
1099 <div class=
"para"><p>This leaves a copy of
<tt>next
</tt> temporarily in FETCH_HEAD, but
1100 does not update any remote-tracking branches.
</p></div>
1104 Bundle local branch
<tt>fixes
</tt> and
<tt>enhancements
</tt> on top of
1105 the current branch, making an Octopus merge:
1107 <div class=
"listingblock">
1108 <div class=
"content">
1109 <pre><tt>$ git pull . fixes enhancements
</tt></pre>
1111 <div class=
"para"><p>This
<tt>git pull .
</tt> syntax is equivalent to
<tt>git merge
</tt>.
</p></div>
1115 Merge local branch
<tt>obsolete
</tt> into the current branch, using
<tt>ours
</tt>
1118 <div class=
"listingblock">
1119 <div class=
"content">
1120 <pre><tt>$ git pull -s ours . obsolete
</tt></pre>
1125 Merge local branch
<tt>maint
</tt> into the current branch, but do not make
1126 a commit automatically:
1128 <div class=
"listingblock">
1129 <div class=
"content">
1130 <pre><tt>$ git pull --no-commit . maint
</tt></pre>
1132 <div class=
"para"><p>This can be used when you want to include further changes to the
1133 merge, or want to write your own merge commit message.
</p></div>
1134 <div class=
"para"><p>You should refrain from abusing this option to sneak substantial
1135 changes into a merge commit. Small fixups like bumping
1136 release/version name would be acceptable.
</p></div>
1140 Command line pull of multiple branches from one repository:
1142 <div class=
"listingblock">
1143 <div class=
"content">
1144 <pre><tt>$ git checkout master
1145 $ git fetch origin +pu:pu maint:tmp
1146 $ git pull . tmp
</tt></pre>
1148 <div class=
"para"><p>This updates (or creates, as necessary) branches
<tt>pu
</tt> and
<tt>tmp
</tt> in
1149 the local repository by fetching from the branches (respectively)
1150 <tt>pu
</tt> and
<tt>maint
</tt> from the remote repository.
</p></div>
1151 <div class=
"para"><p>The
<tt>pu
</tt> branch will be updated even if it is does not fast-forward;
1152 the others will not be.
</p></div>
1153 <div class=
"para"><p>The final command then merges the newly fetched
<tt>tmp
</tt> into master.
</p></div>
1156 <div class=
"para"><p>If you tried a pull which resulted in a complex conflicts and
1157 would want to start over, you can recover with
<em>git-reset
</em>.
</p></div>
1159 <h2 id=
"_see_also">SEE ALSO
</h2>
1160 <div class=
"sectionbody">
1161 <div class=
"para"><p><a href=
"git-fetch.html">git-fetch(
1)
</a>,
<a href=
"git-merge.html">git-merge(
1)
</a>,
<a href=
"git-config.html">git-config(
1)
</a></p></div>
1163 <h2 id=
"_author">Author
</h2>
1164 <div class=
"sectionbody">
1165 <div class=
"para"><p>Written by Linus Torvalds
<torvalds@osdl.org
>
1166 and Junio C Hamano
<gitster@pobox.com
></p></div>
1168 <h2 id=
"_documentation">Documentation
</h2>
1169 <div class=
"sectionbody">
1170 <div class=
"para"><p>Documentation by Jon Loeliger,
1172 Junio C Hamano and the git-list
<git@vger.kernel.org
>.
</p></div>
1174 <h2 id=
"_git">GIT
</h2>
1175 <div class=
"sectionbody">
1176 <div class=
"para"><p>Part of the
<a href=
"git.html">git(
1)
</a> suite
</p></div>
1179 <div id=
"footer-text">
1180 Last updated
2009-
05-
26 08:
38:
35 UTC