@@ -155,18 +155,26 @@ Create the topic branch with the following command:
155
155
156
156
$ git checkout -b BRANCH_NAME master
157
157
158
- .. tip ::
158
+ Or, if you want to provide a bugfix for the 2.0 branch, you need to first track
159
+ the remote `2.0 ` branch locally:
160
+
161
+ .. code-block :: bash
162
+
163
+ $ git checkout -t origin/2.0
164
+
165
+ Then you can create a new branch off the 2.0 branch to work on the bugfix:
166
+
167
+ .. code-block :: bash
159
168
160
- Replace "master" by, for example, 2.0, if you wish to submit a patch to the
161
- 2.0 branch.
169
+ $ git checkout -b BRANCH_NAME 2.0
162
170
163
171
.. tip ::
164
172
165
173
Use a descriptive name for your branch (`ticket_XXX ` where `XXX ` is the
166
174
ticket number is a good convention for bug fixes).
167
175
168
- The above command automatically switches the code to the newly created branch
169
- (check the branch you are working on with `git branch `).
176
+ The above checkout commands automatically switch the code to the newly created
177
+ branch (check the branch you are working on with `git branch `).
170
178
171
179
Work on the code as much as you want and commit as much as you want; but keep
172
180
in mind the following:
@@ -205,6 +213,10 @@ while to finish your changes):
205
213
$ git checkout BRANCH_NAME
206
214
$ git rebase master
207
215
216
+ .. tip ::
217
+
218
+ Replace `master ` with `2.0 ` if you are working on a bugfix
219
+
208
220
When doing the ``rebase `` command, you might have to fix merge conflicts.
209
221
``git status `` will show you the *unmerged * files. Resolve all the conflicts,
210
222
then continue the rebase:
@@ -230,13 +242,19 @@ message, like in:
230
242
[Yaml] foo bar
231
243
[Form] [Validator] [FrameworkBundle] foo bar
232
244
245
+ .. tip ::
246
+
247
+ Take care to point your pull request towards ``symfony:2.0 `` if you want
248
+ the core team to pull a bugfix based on the 2.0 branch.
249
+
233
250
If you are going to send an email to the mailing-list, don't forget to
234
251
reference you branch URL (``https://github.com/USERNAME/symfony.git
235
252
BRANCH_NAME ``) or the pull request URL.
236
253
237
254
Based on the feedback from the mailing-list or via the pull request on GitHub,
238
255
you might need to rework your patch. Before re-submitting the patch, rebase
239
- with master, don't merge; and force the push to the origin:
256
+ with upstream/master or upstream/2.0, don't merge; and force the push to the
257
+ origin:
240
258
241
259
.. code-block :: bash
242
260
0 commit comments