Skip to content

Commit 3fdba64

Browse files
committed
Direct 'upstream' push to the user's fork. Now pull comes from upstream and push goes to origin.
1 parent 857e4f6 commit 3fdba64

File tree

1 file changed

+8
-3
lines changed

1 file changed

+8
-3
lines changed

getting-started/setup-building.rst

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,7 @@ The CPython repo is hosted on GitHub. To get a copy of the source code you shoul
6060
:ref:`fork the Python repository on GitHub <fork-cpython>`, :ref:`create a local
6161
clone of your personal fork, and configure the remotes <clone-your-fork>`.
6262

63-
You will only need to execute these steps once:
63+
You will only need to execute these steps once per machine:
6464

6565
1. Go to https://github.com/python/cpython.
6666

@@ -85,13 +85,18 @@ You will only need to execute these steps once:
8585

8686
$ git config --local branch.main.remote upstream
8787

88-
8. Verify that your setup is correct::
88+
8. Since one should never attempt to push to ``upstream``, configure
89+
``git`` to push always to ``origin``::
90+
91+
$ git remote set-url --push upstream git@github.com:<your-username>/cpython.git
92+
93+
9. Verify that your setup is correct::
8994

9095
$ git remote -v
9196
origin git@github.com:<your-username>/cpython.git (fetch)
9297
origin git@github.com:<your-username>/cpython.git (push)
9398
upstream git@github.com:python/cpython.git (fetch)
94-
upstream git@github.com:python/cpython.git (push)
99+
upstream git@github.com:<your-username>/cpython.git (push)
95100
$ git config branch.main.remote
96101
upstream
97102

0 commit comments

Comments
 (0)