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

Skip to content

Commit 9cc5913

Browse files
committed
DOC : address issues with text to improve clarity
1 parent cfd79f3 commit 9cc5913

File tree

1 file changed

+21
-27
lines changed

1 file changed

+21
-27
lines changed

doc/devel/coding_guide.rst

Lines changed: 21 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -135,8 +135,8 @@ C/C++ extensions
135135
docstrings, and the Numpydoc format is well understood in the
136136
scientific Python community.
137137

138-
Rebasing a Pull Request
139-
-----------------------
138+
Rebasing a Pull Request (PR)
139+
----------------------------
140140

141141
When working on a PR, changes may occur in the parent branch (usually master).
142142
This can lead to conflict with changes in your branch. The conflicts can be
@@ -159,38 +159,29 @@ bad practice, but in this case it is very useful.
159159

160160
The following example assumes that the remote of _your_ github
161161
repository is called `github` and the remote of the official
162-
repository is called `upstream`.
162+
repository is called `matplotlib`.
163163

164164
The first step is to make sure that your local copy of the upstream repository is
165165
up-to-date::
166166

167-
$ git fetch upstream
167+
$ git fetch matplotlib
168168

169169
This updates your local copy of the repository, but does not change any files
170170
in your working copy. Next, switch to the branch that you want to update::
171171

172172
$ git checkout backend_plt_refactor
173173

174174
You are now ready to start the rebase of your branch onto the target
175-
parent branch, in this case `upstream/master` ::
175+
parent branch, in this case `matplotlib/master` ::
176176

177-
$ git rebase upstream/master
177+
$ git rebase matplotlib/master
178178

179179
and git will then give a bunch of feed back::
180180

181181
First, rewinding head to replay your work on top of it...
182182
Applying: first steps to extract FigureManager* and friends from pyplot
183183
Applying: split backend_qt4 into two parts, with and without Gcf
184-
Applying: split backend_qt4agg into two parts.
185-
Applying: Added a demo-file to show how to use the FigureManager classes to
186-
Applying: removed un-needed import of Gcf
187-
Applying: pep8 on backend_gtk.py
188-
Applying: pep8 clean up in backend_gdk
189-
Applying: removed un-needed Gcf import
190-
Applying: split backend_gcf into two parts,
191-
Applying: pep8 on backend_gtkagg.py
192-
Applying: split backend_gktagg.py in to two parts
193-
Applying: updated exclude list
184+
...
194185
Applying: pep8 clean up on backend_gtk3.py
195186
Using index info to reconstruct a base tree...
196187
M lib/matplotlib/backends/backend_gtk3.py
@@ -207,7 +198,7 @@ and git will then give a bunch of feed back::
207198
To check out the original branch and stop rebasing, run "git rebase --abort".
208199

209200
A number of commits could be cleanly applied to
210-
the tip of `upstream/master`, however, git eventually hit a commit
201+
the tip of `matplotlib/master`, however, git eventually hits a commit
211202
that had conflicts. In this case in the file
212203
`lib/matplotlib/backends/backend_gtk3.py`. For more verbose information run ::
213204

@@ -226,8 +217,9 @@ that had conflicts. In this case in the file
226217

227218
no changes added to commit (use "git add" and/or "git commit -a")
228219

229-
This exactly where the conflict is and some advice on how to proceed. Opening
230-
up the file in question, you will see blocks that look something like this::
220+
This tells you exactly where the conflict is and provides some advice
221+
on how to proceed. Opening up the file in question, you will see
222+
blocks that look something like this::
231223

232224
<<<<<<< HEAD
233225
=======
@@ -244,7 +236,7 @@ resolved all the conflicts, `add` the file to the index::
244236
$ git add lib/matplotlib/backends/backend_gtk3.py
245237

246238
Repeat this for all of the files that have conflicts. When you are done with
247-
that we can check the status::
239+
that you can check the status::
248240

249241
$ git status
250242
rebase in progress; onto e6f8993
@@ -262,20 +254,22 @@ commit and can continue::
262254
$ git rebase --continue
263255

264256
You now iterate the until you have made it through all of the commits
265-
which have conflicts.
257+
which have conflicts. Once you have successfully rebased your branch,
258+
be sure to re-run the tests to make sure everything is still working
259+
properly.
266260

267-
Your branch is now rebased, however, because of the way git determines
268-
the hash of each commit, it now shares no commits with your old branch
269-
published on github so you can not push to that branch as you would when
270-
simply adding commits. In order to publish your newly re-based branch you need to
271-
use the `--force` flag::
261+
Your branch is now rebased, however, because of the way git
262+
determines the hash of each commit, it now shares no commits with your
263+
old branch published on github so you can not push to that branch as
264+
you would when simply adding commits. In order to publish your newly
265+
rebased (and tested!) branch you need to use the `--force` flag::
272266

273267
$ git push --force github
274268

275269
which will _replace_ all of the commits under your branch on github
276270
with the new versions of the commit.
277271

278-
Congratulations, you have re-based your branch!
272+
Congratulations, you have rebased your branch!
279273

280274

281275
Style guide

0 commit comments

Comments
 (0)