-
-
Notifications
You must be signed in to change notification settings - Fork 795
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* Update docs to configure 'main' to pull from 'upstream'. Ref python/core-workflow#475. * Quote 'main'. Co-authored-by: Ezio Melotti <[email protected]> * Direct 'upstream' push to the user's fork. Now pull comes from upstream and push goes to origin. * Apply the changes also to the git boot camp. * Prefer https for upstream fetch. Co-authored-by: C.A.M. Gerlach <[email protected]> * Update expectations and sync guidance for d7e9065. Remove superfluous .git from https. Co-authored-by: Ezio Melotti <[email protected]> Co-authored-by: C.A.M. Gerlach <[email protected]>
- Loading branch information
1 parent
c4fbdc9
commit 5e52f93
Showing
2 changed files
with
39 additions
and
9 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -47,17 +47,29 @@ You will only need to do this once. | |
Cloning a Forked CPython Repository | ||
----------------------------------- | ||
|
||
You will only need to do this once. From your command line:: | ||
You will only need to do this once per machine. From your command line:: | ||
|
||
git clone [email protected]:<username>/cpython.git | ||
|
||
It is also recommended to configure an ``upstream`` remote repository:: | ||
|
||
cd cpython | ||
git remote add upstream git@github.com:python/cpython.git | ||
git remote add upstream https://github.com/python/cpython | ||
|
||
You can also use SSH-based or HTTPS-based URLs. | ||
|
||
Configure the Remotes | ||
--------------------- | ||
|
||
Configure ``git`` to pull ``main`` from the ``upstream`` remote:: | ||
|
||
git config --local branch.main.remote upstream | ||
|
||
Since one should never attempt to push to ``upstream``, configure | ||
``git`` to push always to ``origin``:: | ||
|
||
git remote set-url --push upstream [email protected]:<username>/cpython.git | ||
|
||
Listing the Remote Repositories | ||
------------------------------- | ||
|
||
|
@@ -70,8 +82,15 @@ and ``upstream`` pointing to the official CPython repository:: | |
|
||
origin [email protected]:<username>/cpython.git (fetch) | ||
origin [email protected]:<username>/cpython.git (push) | ||
upstream [email protected]:python/cpython.git (fetch) | ||
upstream [email protected]:python/cpython.git (push) | ||
upstream https://github.com/python/cpython (fetch) | ||
upstream [email protected]:<username>/cpython.git (push) | ||
|
||
To verify the upstream for ``main``:: | ||
|
||
git config branch.main.remote | ||
|
||
It should emit ``upstream``, indicating to track/pull changes for ``main`` from the | ||
``upstream`` remote. | ||
|
||
|
||
.. _set-up-name-email: | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -60,7 +60,7 @@ The CPython repo is hosted on GitHub. To get a copy of the source code you shoul | |
:ref:`fork the Python repository on GitHub <fork-cpython>`, :ref:`create a local | ||
clone of your personal fork, and configure the remotes <clone-your-fork>`. | ||
|
||
You will only need to execute these steps once: | ||
You will only need to execute these steps once per machine: | ||
|
||
1. Go to https://github.com/python/cpython. | ||
|
||
|
@@ -79,15 +79,26 @@ You will only need to execute these steps once: | |
6. Configure an ``upstream`` remote:: | ||
|
||
$ cd cpython | ||
$ git remote add upstream git@github.com:python/cpython.git | ||
$ git remote add upstream https://github.com/python/cpython | ||
|
||
7. Verify that your setup is correct:: | ||
7. Configure ``git`` to pull ``main`` from the ``upstream`` remote:: | ||
|
||
$ git config --local branch.main.remote upstream | ||
|
||
8. Since one should never attempt to push to ``upstream``, configure | ||
``git`` to push always to ``origin``:: | ||
|
||
$ git remote set-url --push upstream [email protected]:<your-username>/cpython.git | ||
|
||
9. Verify that your setup is correct:: | ||
|
||
$ git remote -v | ||
origin [email protected]:<your-username>/cpython.git (fetch) | ||
origin [email protected]:<your-username>/cpython.git (push) | ||
upstream [email protected]:python/cpython.git (fetch) | ||
upstream [email protected]:python/cpython.git (push) | ||
upstream https://github.com/python/cpython (fetch) | ||
upstream [email protected]:<your-username>/cpython.git (push) | ||
$ git config branch.main.remote | ||
upstream | ||
|
||
If you did everything correctly, you should now have a copy of the code | ||
in the ``cpython`` directory and two remotes that refer to your own GitHub fork | ||
|