@@ -135,34 +135,27 @@ C/C++ extensions
135
135
docstrings, and the Numpydoc format is well understood in the
136
136
scientific Python community.
137
137
138
- Rebase a Pull Request
139
- ----------------------
140
-
141
- When working on a PR it is possible for other changes to get merged
142
- into the parent branch that conflict with changes on your branch. The
143
- conflicts can be trivial, for example both the parent branch and your
144
- branch add an entry to the top of `CHANGELOG `. Git can not
145
- unambiguously tell what to with both changes (should one go above the
146
- other? if so, which order? should it try to merge them?) so it gives
147
- up and declare the branches can not be merged cleanly. If you were
148
- the branches at the command line you could do an interactive merge
149
- where git pauses half way through to give you a chance to resolve the
150
- conflicts by hand, however using github almost all of the merges back
151
- into the parent branches are done via the web-interface, so only PRs
152
- which will cleanly merged will be accepted. If this happens to your
153
- PR, one of the developers will ask you to 'rebase' your branch which
154
- is the process by which you resolve the conflicts between your branch
155
- and the parent branch.
156
-
157
- In git rebasing is a mild form of re-writing history, as it
158
- effectively transplants where your branch from where you intially
159
- forked of off the parent branch to some other point. For a much more
160
- detailed explanation (with pictures!) see `this nice write up
161
- <http://git-scm.com/book/en/Git-Branching-Rebasing> `. The numpy team
162
- has also `documented how to do this
138
+ Rebasing a Pull Request
139
+ -----------------------
140
+
141
+ When working on a PR, changes may occur in the parent branch (usually master).
142
+ This can lead to conflict with changes in your branch. The conflicts can be
143
+ trivial: for example both the parent branch and your branch add an entry to
144
+ the top of `CHANGELOG `. Git can not unambiguously tell what to with both
145
+ changes (should one go above the other? if so, which order? should it try to
146
+ merge them?) so it declares the branches can not be merged
147
+ cleanly. Github can only automatically merge PR without conflicts, so you will
148
+ need to manually 'rebase'. This is the process of updating your branch with
149
+ upstream changes, and resolving conflicts.
150
+
151
+ In git, rebasing is a mild form of re-writing history: it effectively forwards
152
+ all your commits to the updated upstream commit. For a much more detailed
153
+ explanation (with pictures!) see `this nice write up
154
+ <http://git-scm.com/book/en/Git-Branching-Rebasing> `. The numpy team has also
155
+ `documented how to do this
163
156
<http://docs.scipy.org/doc/numpy/dev/gitwash/development_workflow.html#rebasing-on-master> `
164
- In general, re-writing history, particularly published history, is
165
- considered bad form , but in this case it is very useful.
157
+ In general, re-writing history, particularly published history, is considered
158
+ bad practice , but in this case it is very useful.
166
159
167
160
The following example assumes that the remote of _your_ github
168
161
repository is called `github ` and the remote of the official
@@ -173,8 +166,8 @@ up-to-date::
173
166
174
167
$ git fetch upstream
175
168
176
- which updates your local copy of the repository, but does not change any files
177
- in your working copy. Next, switch to the branch that you want to rebase ::
169
+ This updates your local copy of the repository, but does not change any files
170
+ in your working copy. Next, switch to the branch that you want to update ::
178
171
179
172
$ git checkout backend_plt_refactor
180
173
@@ -214,7 +207,7 @@ and git will then give a bunch of feed back::
214
207
To check out the original branch and stop rebasing, run "git rebase --abort".
215
208
216
209
A number of commits could be cleanly applied to
217
- the tip of `upstream/master `, however, git eventualy hit a commit
210
+ the tip of `upstream/master `, however, git eventually hit a commit
218
211
that had conflicts. In this case in the file
219
212
`lib/matplotlib/backends/backend_gtk3.py `. For more verbose information run ::
220
213
0 commit comments