@@ -52,17 +52,17 @@ use::
52
52
git fetch origin
53
53
git checkout -b my-new-feature origin/v1.0.x
54
54
55
- Generally, you will want to keep this also on your public github _ fork
56
- of matplotlib _. To do this, you `git push `_ this new branch up to your github _
55
+ Generally, you will want to keep this also on your public GitHub _ fork
56
+ of matplotlib _. To do this, you `git push `_ this new branch up to your GitHub _
57
57
repo. Generally (if you followed the instructions in these pages, and
58
- by default), git will have a link to your github _ repo, called
59
- ``origin ``. You push up to your own repo on github _ with::
58
+ by default), git will have a link to your GitHub _ repo, called
59
+ ``origin ``. You push up to your own repo on GitHub _ with::
60
60
61
61
git push origin my-new-feature
62
62
63
63
You will need to use this exact command, rather than simply ``git
64
64
push `` every time you want to push changes on your feature branch to
65
- your github _ repo. However, in git >1.7 you can set up a link by
65
+ your GitHub _ repo. However, in git >1.7 you can set up a link by
66
66
using the ``--set-upstream `` option::
67
67
68
68
git push --set-upstream origin my-new-feature
@@ -114,7 +114,7 @@ In more detail
114
114
faith |emdash | or see `why the -a flag? `_ |emdash | and the helpful use-case
115
115
description in the `tangled working copy problem `_. The `git commit `_ manual
116
116
page might also be useful.
117
- #. To push the changes up to your forked repo on github _ , do a ``git
117
+ #. To push the changes up to your forked repo on GitHub _ , do a ``git
118
118
push `` (see `git push `).
119
119
120
120
Asking for code review |emdash | open a Pull Request (PR)
@@ -153,7 +153,7 @@ trivial: for example both the parent branch and your branch add an entry to
153
153
the top of `CHANGELOG `. Git can not unambiguously tell what to with both
154
154
changes (should one go above the other? if so, which order? should it try to
155
155
merge them?) so it declares the branches can not be merged
156
- cleanly. Github can only automatically merge PR without conflicts, so you will
156
+ cleanly. GitHub can only automatically merge PR without conflicts, so you will
157
157
need to manually 'rebase'. This is the process of updating your branch with
158
158
upstream changes, and resolving conflicts.
159
159
@@ -166,8 +166,8 @@ explanation (with pictures!) see `this nice write up
166
166
In general, re-writing history, particularly published history, is considered
167
167
bad practice, but in this case it is very useful.
168
168
169
- The following example assumes that the remote of _your_ github
170
- repository is called `github ` and the remote of the official
169
+ The following example assumes that the remote of _your_ GitHub
170
+ repository is called `origin ` and the remote of the official
171
171
repository is called `matplotlib `.
172
172
173
173
The first step is to make sure that your local copy of the upstream repository is
@@ -269,21 +269,21 @@ properly.
269
269
270
270
Your branch is now rebased, however, because of the way git
271
271
determines the hash of each commit, it now shares no commits with your
272
- old branch published on github so you can not push to that branch as
272
+ old branch published on GitHub so you can not push to that branch as
273
273
you would when simply adding commits. In order to publish your newly
274
274
rebased (and tested!) branch you need to use the `--force ` flag::
275
275
276
- $ git push --force github
276
+ $ git push --force origin
277
277
278
- which will _replace_ all of the commits under your branch on github
278
+ which will _replace_ all of the commits under your branch on GitHub
279
279
with the new versions of the commit.
280
280
281
281
Congratulations, you have rebased your branch!
282
282
283
283
Staying up to date with changes in the central repository
284
284
=========================================================
285
285
286
- This updates your working copy from the upstream `matplotlib github `_
286
+ This updates your working copy from the upstream `matplotlib GitHub `_
287
287
repo.
288
288
289
289
Overview
@@ -294,9 +294,9 @@ Overview
294
294
# go to your master branch
295
295
git checkout master
296
296
# pull changes from github
297
- git fetch upstream
298
- # merge from upstream
299
- git merge --ff-only upstream /master
297
+ git fetch matplotlib
298
+ # merge from matplotlib
299
+ git merge --ff-only matplotlib /master
300
300
301
301
In detail
302
302
---------
@@ -334,7 +334,7 @@ Other integration branches
334
334
--------------------------
335
335
336
336
Some people like to keep separate local branches corresponding to the
337
- maintenance branches on github . At the time of this writing, ``v1.0.x ``
337
+ maintenance branches on GitHub . At the time of this writing, ``v1.0.x ``
338
338
is the active maintenance branch. If you have such a local branch,
339
339
treat is just as ``master ``: don't commit on it, and before starting
340
340
new branches off of it, update it from upstream::
@@ -383,20 +383,52 @@ make sure to reset the correct branch::
383
383
git reset --hard upstream/master
384
384
385
385
386
- Deleting a branch on github _
386
+ Deleting a branch on GitHub _
387
387
============================
388
388
389
389
::
390
390
391
391
git checkout master
392
392
# delete branch locally
393
393
git branch -D my-unwanted-branch
394
- # delete branch on github
394
+ # delete branch on GitHub
395
395
git push origin :my-unwanted-branch
396
396
397
397
(Note the colon ``: `` before ``test-branch ``. See also:
398
398
http://github.com/guides/remove-a-remote-branch
399
399
400
+ <<<<<<< b3d268fa14cd1d19ac7ce337425602944b6e52b3
401
+ =======
402
+ Several people sharing a single repository
403
+ ==========================================
404
+
405
+ If you want to work on some stuff with other people, where you are all
406
+ committing into the same repository, or even the same branch, then just
407
+ share it via GitHub _.
408
+
409
+ First fork matplotlib into your account, as from :ref: `forking `.
410
+
411
+ Then, go to your forked repository GitHub page, say
412
+ ``http://github.com/your-user-name/matplotlib ``
413
+
414
+ Click on the 'Admin' button, and add anyone else to the repo as a
415
+ collaborator:
416
+
417
+ .. image :: pull_button.png
418
+
419
+ Now all those people can do::
420
+
421
+ git clone git@github.com:your-user-name/matplotlib.git
422
+
423
+ Remember that links starting with ``git@ `` use the ssh protocol and are
424
+ read-write; links starting with ``git:// `` are read-only.
425
+
426
+ Your collaborators can then commit directly into that repo with the
427
+ usual::
428
+
429
+ git commit -am 'ENH - much better code'
430
+ git push origin master # pushes directly into your repo
431
+ >>>>>>> FIX github -> GitHub
400
432
401
433
Exploring your repository
402
434
=========================
@@ -410,7 +442,7 @@ To see a linear list of commits for this branch::
410
442
411
443
git log
412
444
413
- You can also look at the `network graph visualizer `_ for your github _
445
+ You can also look at the `network graph visualizer `_ for your GitHub _
414
446
repo.
415
447
416
448
.. include :: links.inc
0 commit comments