Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit f051132

Browse files
committed
DOC: minor tweaks to manual backport instructions
1 parent 922c950 commit f051132

File tree

1 file changed

+17
-5
lines changed

1 file changed

+17
-5
lines changed

doc/devel/coding_guide.rst

Lines changed: 17 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -148,12 +148,24 @@ We do a backport from master to v2.2.x assuming:
148148

149149
The ``TARGET_SHA`` is the hash of the merge commit you would like to
150150
backport. This can be read off of the github PR page (in the UI with
151-
the merge notification) or through the git CLI tools.::
151+
the merge notification) or through the git CLI tools.
152152

153-
git fetch matplotlib
154-
git checkout v2.2.x
155-
git merge --ff-only matplotlib/v2.2.x
153+
Assuming that you already have a local branch ``v2.2.x`` (if not, then
154+
``git checkout -b v2.2.x`), and that your remote pointing to ``https://github.com/matplotlib/matplotlib`` is called ``upstream``::
155+
156+
git fetch upstream
157+
git checkout v2.2.x # or include -b if you don't already have this.
158+
git reset --hard upstream/v2.2.x
156159
git cherry-pick -m 1 TARGET_SHA
157160
# resolve conflicts and commit if required
158161

159-
Use your discretion to push directly to upstream or to open a PR.
162+
The conflicts will have to be searched for by hand, (search on ``>>>>>``)
163+
and if a file is conflicted, you will have to re-add to the branch and
164+
make a commit::
165+
166+
git add lib/matplotlib/conflicted_file.py
167+
git add lib/matplotlib/conflicted_file2.py
168+
git commit -a -m "MRG: backport of SHA"
169+
170+
Use your discretion to push directly to upstream or to open a PR; be
171+
sure to push or PR against the `v2.2.x` upstream branch, not `master`!

0 commit comments

Comments
 (0)