Skip to content

Commit 3792dee

Browse files
committed
Apply the changes also to the git boot camp.
1 parent 879e759 commit 3792dee

File tree

1 file changed

+21
-2
lines changed

1 file changed

+21
-2
lines changed

getting-started/git-boot-camp.rst

Lines changed: 21 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ You will only need to do this once.
4747
Cloning a Forked CPython Repository
4848
-----------------------------------
4949

50-
You will only need to do this once. From your command line::
50+
You will only need to do this once per machine. From your command line::
5151

5252
git clone git@github.com:<username>/cpython.git
5353

@@ -58,6 +58,18 @@ It is also recommended to configure an ``upstream`` remote repository::
5858

5959
You can also use SSH-based or HTTPS-based URLs.
6060

61+
Configure the Remotes
62+
---------------------
63+
64+
Configure ``git`` to pull ``main`` from the ``upstream`` remote::
65+
66+
git config --local branch.main.remote upstream
67+
68+
Since one should never attempt to push to ``upstream``, configure
69+
``git`` to push always to ``origin``::
70+
71+
git remote set-url --push upstream git@github.com:<username>/cpython.git
72+
6173
Listing the Remote Repositories
6274
-------------------------------
6375

@@ -71,7 +83,14 @@ and ``upstream`` pointing to the official CPython repository::
7183
origin git@github.com:<username>/cpython.git (fetch)
7284
origin git@github.com:<username>/cpython.git (push)
7385
upstream git@github.com:python/cpython.git (fetch)
74-
upstream git@github.com:python/cpython.git (push)
86+
upstream git@github.com:<username>/cpython.git (push)
87+
88+
To verify the upstream for ``main``::
89+
90+
git config branch.main.remote
91+
92+
It should emit ``upstream``, indicating to track/pull changes for ``main`` from the
93+
``upstream`` remote.
7594

7695

7796
.. _set-up-name-email:

0 commit comments

Comments
 (0)