@@ -111,53 +111,71 @@ rules apply:
111
111
EXAMPLES
112
112
--------
113
113
114
- git pull, git pull origin::
115
- Update the remote-tracking branches for the repository
116
- you cloned from, then merge one of them into your
117
- current branch. Normally the branch merged in is
118
- the HEAD of the remote repository, but the choice is
119
- determined by the branch.<name>.remote and
120
- branch.<name>.merge options; see linkgit:git-config[1]
121
- for details.
122
-
123
- git pull origin next::
124
- Merge into the current branch the remote branch `next`;
125
- leaves a copy of `next` temporarily in FETCH_HEAD, but
126
- does not update any remote-tracking branches.
127
-
128
- git pull . fixes enhancements::
129
- Bundle local branch `fixes` and `enhancements` on top of
130
- the current branch, making an Octopus merge. This `git pull .`
131
- syntax is equivalent to `git merge`.
132
-
133
- git pull -s ours . obsolete::
134
- Merge local branch `obsolete` into the current branch,
135
- using `ours` merge strategy.
136
-
137
- git pull --no-commit . maint::
138
- Merge local branch `maint` into the current branch, but
139
- do not make a commit automatically. This can be used
140
- when you want to include further changes to the merge,
141
- or want to write your own merge commit message.
114
+ * Update the remote-tracking branches for the repository
115
+ you cloned from, then merge one of them into your
116
+ current branch:
117
+ +
118
+ ------------------------------------------------
119
+ $ git pull, git pull origin
120
+ ------------------------------------------------
121
+ +
122
+ Normally the branch merged in is the HEAD of the remote repository,
123
+ but the choice is determined by the branch.<name>.remote and
124
+ branch.<name>.merge options; see linkgit:git-config[1] for details.
125
+
126
+ * Merge into the current branch the remote branch `next`:
127
+ +
128
+ ------------------------------------------------
129
+ $ git pull origin next
130
+ ------------------------------------------------
131
+ +
132
+ This leaves a copy of `next` temporarily in FETCH_HEAD, but
133
+ does not update any remote-tracking branches.
134
+
135
+ * Bundle local branch `fixes` and `enhancements` on top of
136
+ the current branch, making an Octopus merge:
137
+ +
138
+ ------------------------------------------------
139
+ $ git pull . fixes enhancements
140
+ ------------------------------------------------
141
+ +
142
+ This `git pull .` syntax is equivalent to `git merge`.
143
+
144
+ * Merge local branch `obsolete` into the current branch, using `ours`
145
+ merge strategy:
146
+ +
147
+ ------------------------------------------------
148
+ $ git pull -s ours . obsolete
149
+ ------------------------------------------------
150
+
151
+ * Merge local branch `maint` into the current branch, but do not make
152
+ a commit automatically:
153
+ +
154
+ ------------------------------------------------
155
+ $ git pull --no-commit . maint
156
+ ------------------------------------------------
157
+ +
158
+ This can be used when you want to include further changes to the
159
+ merge, or want to write your own merge commit message.
142
160
+
143
161
You should refrain from abusing this option to sneak substantial
144
162
changes into a merge commit. Small fixups like bumping
145
163
release/version name would be acceptable.
146
164
147
- Command line pull of multiple branches from one repository: :
165
+ * Command line pull of multiple branches from one repository:
148
166
+
149
167
------------------------------------------------
150
168
$ git checkout master
151
169
$ git fetch origin +pu:pu maint:tmp
152
170
$ git pull . tmp
153
171
------------------------------------------------
154
172
+
155
- This updates (or creates, as necessary) branches `pu` and `tmp`
156
- in the local repository by fetching from the branches
157
- (respectively) `pu` and `maint` from the remote repository.
173
+ This updates (or creates, as necessary) branches `pu` and `tmp` in
174
+ the local repository by fetching from the branches (respectively)
175
+ `pu` and `maint` from the remote repository.
158
176
+
159
- The `pu` branch will be updated even if it is does not
160
- fast-forward; the others will not be.
177
+ The `pu` branch will be updated even if it is does not fast-forward;
178
+ the others will not be.
161
179
+
162
180
The final command then merges the newly fetched `tmp` into master.
163
181
0 commit comments