Skip to content

Update steps for 'Getting the source code' and link 'Git Bootcamp' #986

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 5 commits into from
Nov 15, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions getting-started/git-boot-camp.rst
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,9 @@ You can also use SSH-based or HTTPS-based URLs.
Configure the Remotes
---------------------

.. These steps are duplicated in setup-building in step 6 and 7.
Please update these there as well.

Configure ``git`` to pull ``main`` from the ``upstream`` remote::

git config --local branch.main.remote upstream
Expand Down
18 changes: 9 additions & 9 deletions getting-started/setup-building.rst
Original file line number Diff line number Diff line change
Expand Up @@ -76,21 +76,18 @@ You will only need to execute these steps once per machine:

(You can use both SSH-based or HTTPS-based URLs.)

6. Configure an ``upstream`` remote::
.. Step 6 and 7 are are duplicated in bootcamp as well.
Please update these steps in both places.

6. Add an ``upstream`` remote, then configure ``git``
to pull ``main`` from ``upstream`` and always push to ``origin``::

$ cd cpython
$ git remote add upstream https://github.com/python/cpython

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 git@github.com:<your-username>/cpython.git

9. Verify that your setup is correct::
7. Verify that your setup is correct::

$ git remote -v
origin git@github.com:<your-username>/cpython.git (fetch)
Expand All @@ -100,6 +97,9 @@ You will only need to execute these steps once per machine:
$ git config branch.main.remote
upstream

For more information about these commands see
:ref:`Git Bootcamp and Cheat Sheat <git-boot-camp>`.

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
(``origin``) and the official CPython repository (``upstream``).
Expand Down