@@ -45,10 +45,12 @@ When making a PR, pay attention to:
4545 on GitHub.
4646* When updating your PR, instead of adding new commits to fix something, please
4747 consider amending your initial commit(s) to keep the history clean.
48- You can achieve this using::
48+ You can achieve this using
4949
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
5254
5355 See also :ref: `contributing ` for how to make a PR.
5456
@@ -352,22 +354,26 @@ the merge notification) or through the git CLI tools.
352354
353355Assuming that you already have a local branch ``v2.2.x `` (if not, then
354356``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
356360
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
362366
363367 Files with conflicts can be listed by ``git status ``,
364368and will have to be fixed by hand (search on ``>>>>> ``). Once
365369the 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
367373
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
371377
372378 Use your discretion to push directly to upstream or to open a PR; be
373379sure to push or PR against the ``v2.2.x `` upstream branch, not ``master ``!
0 commit comments