@@ -38,17 +38,17 @@ use::
38
38
git fetch origin
39
39
git checkout -b my-new-feature origin/v1.0.x
40
40
41
- Generally, you will want to keep this also on your public github _ fork
42
- of matplotlib _. To do this, you `git push `_ this new branch up to your github _
41
+ Generally, you will want to keep this also on your public GitHub _ fork
42
+ of matplotlib _. To do this, you `git push `_ this new branch up to your GitHub _
43
43
repo. Generally (if you followed the instructions in these pages, and
44
- by default), git will have a link to your github _ repo, called
45
- ``origin ``. You push up to your own repo on github _ with::
44
+ by default), git will have a link to your GitHub _ repo, called
45
+ ``origin ``. You push up to your own repo on GitHub _ with::
46
46
47
47
git push origin my-new-feature
48
48
49
49
You will need to use this exact command, rather than simply ``git
50
50
push `` every time you want to push changes on your feature branch to
51
- your github _ repo. However, in git >1.7 you can set up a link by
51
+ your GitHub _ repo. However, in git >1.7 you can set up a link by
52
52
using the ``--set-upstream `` option::
53
53
54
54
git push --set-upstream origin my-new-feature
@@ -100,7 +100,7 @@ In more detail
100
100
faith |emdash | or see `why the -a flag? `_ |emdash | and the helpful use-case
101
101
description in the `tangled working copy problem `_. The `git commit `_ manual
102
102
page might also be useful.
103
- #. To push the changes up to your forked repo on github _ , do a ``git
103
+ #. To push the changes up to your forked repo on GitHub _ , do a ``git
104
104
push `` (see `git push `).
105
105
106
106
Asking for code review
@@ -155,7 +155,7 @@ When you are ready to ask for the merge of your code:
155
155
156
156
#. If the branch is to be merged into a maintenance branch on the main
157
157
repo, make sure the "base branch" indicates the maintenance branch
158
- and not master. Github can not automatically determine the branch
158
+ and not master. GitHub can not automatically determine the branch
159
159
to merge into.
160
160
161
161
Rebasing a Pull Request (PR)
@@ -167,21 +167,21 @@ trivial: for example both the parent branch and your branch add an entry to
167
167
the top of `CHANGELOG `. Git can not unambiguously tell what to with both
168
168
changes (should one go above the other? if so, which order? should it try to
169
169
merge them?) so it declares the branches can not be merged
170
- cleanly. Github can only automatically merge PR without conflicts, so you will
170
+ cleanly. GitHub can only automatically merge PR without conflicts, so you will
171
171
need to manually 'rebase'. This is the process of updating your branch with
172
172
upstream changes, and resolving conflicts.
173
173
174
174
In git, rebasing is a mild form of re-writing history: it effectively forwards
175
175
all your commits to the updated upstream commit. For a much more detailed
176
176
explanation (with pictures!) see `this nice write up
177
- <http ://git-scm.com/book/en/Git-Branching-Rebasing> `. The numpy team has also
177
+ <https ://git-scm.com/book/en/Git-Branching-Rebasing> `. The NumPy team has also
178
178
`documented how to do this
179
179
<http://docs.scipy.org/doc/numpy/dev/gitwash/development_workflow.html#rebasing-on-master> `
180
180
In general, re-writing history, particularly published history, is considered
181
181
bad practice, but in this case it is very useful.
182
182
183
- The following example assumes that the remote of _your_ github
184
- repository is called `github ` and the remote of the official
183
+ The following example assumes that the remote of _your_ GitHub
184
+ repository is called `origin ` and the remote of the official
185
185
repository is called `matplotlib `.
186
186
187
187
The first step is to make sure that your local copy of the upstream repository is
@@ -221,9 +221,9 @@ and git will then give a bunch of feed back::
221
221
To check out the original branch and stop rebasing, run "git rebase --abort".
222
222
223
223
A number of commits could be cleanly applied to
224
- the tip of `matplotlib/master `, however , git eventually hits a commit
225
- that had conflicts. In this case in the file
226
- `lib/matplotlib/backends/backend_gtk3.py `. For more verbose information run ::
224
+ the tip of `matplotlib/master `. However , git may eventually hit a commit
225
+ that had conflicts: in the example above, this happens in the file
226
+ `lib/matplotlib/backends/backend_gtk3.py `) . For more verbose information run ::
227
227
228
228
$ git status
229
229
@@ -283,21 +283,21 @@ properly.
283
283
284
284
Your branch is now rebased, however, because of the way git
285
285
determines the hash of each commit, it now shares no commits with your
286
- old branch published on github so you can not push to that branch as
286
+ old branch published on GitHub so you can not push to that branch as
287
287
you would when simply adding commits. In order to publish your newly
288
288
rebased (and tested!) branch you need to use the `--force ` flag::
289
289
290
- $ git push --force github
290
+ $ git push --force origin
291
291
292
- which will _replace_ all of the commits under your branch on github
292
+ which will _replace_ all of the commits under your branch on GitHub
293
293
with the new versions of the commit.
294
294
295
295
Congratulations, you have rebased your branch!
296
296
297
297
Staying up to date with changes in the central repository
298
298
=========================================================
299
299
300
- This updates your working copy from the upstream `matplotlib github `_
300
+ This updates your working copy from the upstream `matplotlib GitHub `_
301
301
repo.
302
302
303
303
Overview
@@ -308,9 +308,9 @@ Overview
308
308
# go to your master branch
309
309
git checkout master
310
310
# pull changes from github
311
- git fetch upstream
312
- # merge from upstream
313
- git merge --ff-only upstream /master
311
+ git fetch matplotlib
312
+ # merge from matplotlib
313
+ git merge --ff-only matplotlib /master
314
314
315
315
In detail
316
316
---------
@@ -348,7 +348,7 @@ Other integration branches
348
348
--------------------------
349
349
350
350
Some people like to keep separate local branches corresponding to the
351
- maintenance branches on github . At the time of this writing, ``v1.0.x ``
351
+ maintenance branches on GitHub . At the time of this writing, ``v1.0.x ``
352
352
is the active maintenance branch. If you have such a local branch,
353
353
treat is just as ``master ``: don't commit on it, and before starting
354
354
new branches off of it, update it from upstream::
@@ -397,15 +397,15 @@ make sure to reset the correct branch::
397
397
git reset --hard upstream/master
398
398
399
399
400
- Deleting a branch on github _
400
+ Deleting a branch on GitHub _
401
401
============================
402
402
403
403
::
404
404
405
405
git checkout master
406
406
# delete branch locally
407
407
git branch -D my-unwanted-branch
408
- # delete branch on github
408
+ # delete branch on GitHub
409
409
git push origin :my-unwanted-branch
410
410
411
411
(Note the colon ``: `` before ``test-branch ``. See also:
@@ -416,11 +416,11 @@ Several people sharing a single repository
416
416
417
417
If you want to work on some stuff with other people, where you are all
418
418
committing into the same repository, or even the same branch, then just
419
- share it via github _ .
419
+ share it via GitHub _ .
420
420
421
421
First fork matplotlib into your account, as from :ref: `forking `.
422
422
423
- Then, go to your forked repository github page, say
423
+ Then, go to your forked repository GitHub page, say
424
424
``http://github.com/your-user-name/matplotlib ``
425
425
426
426
Click on the 'Admin' button, and add anyone else to the repo as a
@@ -430,7 +430,7 @@ collaborator:
430
430
431
431
Now all those people can do::
432
432
433
- git clone git@githhub .com:your-user-name/matplotlib.git
433
+ git clone git@github .com:your-user-name/matplotlib.git
434
434
435
435
Remember that links starting with ``git@ `` use the ssh protocol and are
436
436
read-write; links starting with ``git:// `` are read-only.
@@ -453,7 +453,7 @@ To see a linear list of commits for this branch::
453
453
454
454
git log
455
455
456
- You can also look at the `network graph visualizer `_ for your github _
456
+ You can also look at the `network graph visualizer `_ for your GitHub _
457
457
repo.
458
458
459
459
.. include :: links.inc
0 commit comments