Skip to content

Commit bb8525e

Browse files
committed
DOC : address issues with text to improve clarity
1 parent 42ec6a5 commit bb8525e

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
@@ -163,8 +163,8 @@ C/C++ extensions
163163
docstrings, and the Numpydoc format is well understood in the
164164
scientific Python community.
165165

166-
Rebasing a Pull Request
167-
-----------------------
166+
Rebasing a Pull Request (PR)
167+
----------------------------
168168

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

188188
The following example assumes that the remote of _your_ github
189189
repository is called `github` and the remote of the official
190-
repository is called `upstream`.
190+
repository is called `matplotlib`.
191191

192192
The first step is to make sure that your local copy of the upstream repository is
193193
up-to-date::
194194

195-
$ git fetch upstream
195+
$ git fetch matplotlib
196196

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

200200
$ git checkout backend_plt_refactor
201201

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

205-
$ git rebase upstream/master
205+
$ git rebase matplotlib/master
206206

207207
and git will then give a bunch of feed back::
208208

209209
First, rewinding head to replay your work on top of it...
210210
Applying: first steps to extract FigureManager* and friends from pyplot
211211
Applying: split backend_qt4 into two parts, with and without Gcf
212-
Applying: split backend_qt4agg into two parts.
213-
Applying: Added a demo-file to show how to use the FigureManager classes to
214-
Applying: removed un-needed import of Gcf
215-
Applying: pep8 on backend_gtk.py
216-
Applying: pep8 clean up in backend_gdk
217-
Applying: removed un-needed Gcf import
218-
Applying: split backend_gcf into two parts,
219-
Applying: pep8 on backend_gtkagg.py
220-
Applying: split backend_gktagg.py in to two parts
221-
Applying: updated exclude list
212+
...
222213
Applying: pep8 clean up on backend_gtk3.py
223214
Using index info to reconstruct a base tree...
224215
M lib/matplotlib/backends/backend_gtk3.py
@@ -235,7 +226,7 @@ and git will then give a bunch of feed back::
235226
To check out the original branch and stop rebasing, run "git rebase --abort".
236227

237228
A number of commits could be cleanly applied to
238-
the tip of `upstream/master`, however, git eventually hit a commit
229+
the tip of `matplotlib/master`, however, git eventually hits a commit
239230
that had conflicts. In this case in the file
240231
`lib/matplotlib/backends/backend_gtk3.py`. For more verbose information run ::
241232

@@ -254,8 +245,9 @@ that had conflicts. In this case in the file
254245

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

257-
This exactly where the conflict is and some advice on how to proceed. Opening
258-
up the file in question, you will see blocks that look something like this::
248+
This tells you exactly where the conflict is and provides some advice
249+
on how to proceed. Opening up the file in question, you will see
250+
blocks that look something like this::
259251

260252
<<<<<<< HEAD
261253
=======
@@ -272,7 +264,7 @@ resolved all the conflicts, `add` the file to the index::
272264
$ git add lib/matplotlib/backends/backend_gtk3.py
273265

274266
Repeat this for all of the files that have conflicts. When you are done with
275-
that we can check the status::
267+
that you can check the status::
276268

277269
$ git status
278270
rebase in progress; onto e6f8993
@@ -290,20 +282,22 @@ commit and can continue::
290282
$ git rebase --continue
291283

292284
You now iterate the until you have made it through all of the commits
293-
which have conflicts.
285+
which have conflicts. Once you have successfully rebased your branch,
286+
be sure to re-run the tests to make sure everything is still working
287+
properly.
294288

295-
Your branch is now rebased, however, because of the way git determines
296-
the hash of each commit, it now shares no commits with your old branch
297-
published on github so you can not push to that branch as you would when
298-
simply adding commits. In order to publish your newly re-based branch you need to
299-
use the `--force` flag::
289+
Your branch is now rebased, however, because of the way git
290+
determines the hash of each commit, it now shares no commits with your
291+
old branch published on github so you can not push to that branch as
292+
you would when simply adding commits. In order to publish your newly
293+
rebased (and tested!) branch you need to use the `--force` flag::
300294

301295
$ git push --force github
302296

303297
which will _replace_ all of the commits under your branch on github
304298
with the new versions of the commit.
305299

306-
Congratulations, you have re-based your branch!
300+
Congratulations, you have rebased your branch!
307301

308302

309303
Style guide

0 commit comments

Comments
 (0)