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

Skip to content

Commit 4929a77

Browse files
committed
DOC: clarify backporting
1 parent ece9c52 commit 4929a77

1 file changed

Lines changed: 7 additions & 9 deletions

File tree

doc/devel/coding_guide.rst

Lines changed: 7 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -204,22 +204,20 @@ Backports
204204
When doing backports please include the branch you backported the
205205
commit to along with the SHA in a comment on the original PR.
206206

207-
A quick guide to how to backport a merge commit::
207+
Assuming we have ``matplotlib`` as a read-only remote to the
208+
matplotlib/matplotlib repo and ``DANGER`` as a read/write remote to
209+
the matplotlib/matplotlib repo, we do a backport from master to 2.x ::
208210

209-
git remote update
210-
git checkout target_branch
211-
git merge --ff-only matplotlib/target_branch
211+
git fetch matplotlib
212+
git checkout v2.x
213+
git merge --ff-only matplotlib/v2.x
212214
git cherry-pick -m 1 TARGET_SHA
213215
gitk # to look at it
214216
# local tests? (use your judgment)
215-
git push DANGER target_branch
217+
git push DANGER v2.x
216218
# leave a comment on PR noting sha of the resulting commit
217219
# from the cherry-pick + branch it was moved to
218220

219-
here ``matplotlib`` is a read-only remote to the matplotlib/matplotlib
220-
repo and ``DANGER`` is a read/write remote to the matplotlib/matplotlib
221-
repo.
222-
223221
These commands work on git 2.7.1.
224222

225223

0 commit comments

Comments
 (0)