@@ -45,10 +45,12 @@ When making a PR, pay attention to:
45
45
on GitHub.
46
46
* When updating your PR, instead of adding new commits to fix something, please
47
47
consider amending your initial commit(s) to keep the history clean.
48
- You can achieve this using::
48
+ You can achieve this using
49
49
50
- git commit --amend --no-edit
51
- git push [your-remote-repo] [your-branch] --force-with-lease
50
+ .. code-block :: bash
51
+
52
+ git commit --amend --no-edit
53
+ git push [your-remote-repo] [your-branch] --force-with-lease
52
54
53
55
See also :ref: `contributing ` for how to make a PR.
54
56
@@ -352,22 +354,26 @@ the merge notification) or through the git CLI tools.
352
354
353
355
Assuming that you already have a local branch ``v2.2.x `` (if not, then
354
356
``git checkout -b v2.2.x ``), and that your remote pointing to
355
- ``https://github.com/matplotlib/matplotlib `` is called ``upstream ``::
357
+ ``https://github.com/matplotlib/matplotlib `` is called ``upstream ``:
358
+
359
+ .. code-block :: bash
356
360
357
- git fetch upstream
358
- git checkout v2.2.x # or include -b if you don't already have this.
359
- git reset --hard upstream/v2.2.x
360
- git cherry-pick -m 1 TARGET_SHA
361
- # resolve conflicts and commit if required
361
+ git fetch upstream
362
+ git checkout v2.2.x # or include -b if you don't already have this.
363
+ git reset --hard upstream/v2.2.x
364
+ git cherry-pick -m 1 TARGET_SHA
365
+ # resolve conflicts and commit if required
362
366
363
367
Files with conflicts can be listed by ``git status ``,
364
368
and will have to be fixed by hand (search on ``>>>>> ``). Once
365
369
the conflict is resolved, you will have to re-add the file(s) to the branch
366
- and then continue the cherry pick::
370
+ and then continue the cherry pick:
371
+
372
+ .. code-block :: bash
367
373
368
- git add lib/matplotlib/conflicted_file.py
369
- git add lib/matplotlib/conflicted_file2.py
370
- git cherry-pick --continue
374
+ git add lib/matplotlib/conflicted_file.py
375
+ git add lib/matplotlib/conflicted_file2.py
376
+ git cherry-pick --continue
371
377
372
378
Use your discretion to push directly to upstream or to open a PR; be
373
379
sure to push or PR against the ``v2.2.x `` upstream branch, not ``master ``!
0 commit comments