Closed
Description
Hello,
I was following the pull request (PR) step-by-step guide from #103 and ran into an error with a git command. My PR has to do with a typo I found in the cpython documentation, and here are the steps to recreate the situation:
- Begin at https://devguide.python.org/docquality/#helping-with-documentation-issues
- Click "Quick Guide to Pull Requests" link
- Click "got the source code" link
- Follow instructions to fork, clone, and add upstream for cpython.git
(/tmp)$ git clone git@github.com:zthompson47/cpython.git
Cloning into 'cpython'...
remote: Enumerating objects: 757754, done.
remote: Total 757754 (delta 0), reused 0 (delta 0), pack-reused 757754
Receiving objects: 100% (757754/757754), 284.00 MiB | 2.60 MiB/s, done.
Resolving deltas: 100% (608403/608403), done.
Checking out files: 100% (4307/4307), done.
(/tmp)$ cd cpython
(/tmp/cpython)$ git remote add upstream git@github.com:python/cpython.git
(/tmp/cpython)$ git remote -v
origin git@github.com:zthompson47/cpython.git (fetch)
origin git@github.com:zthompson47/cpython.git (push)
upstream git@github.com:python/cpython.git (fetch)
upstream git@github.com:python/cpython.git (push)
- Go back to https://devguide.python.org/pullrequest/#step-by-step-guide
- Try to "Create a new branch in your local clone"
(/tmp/cpython)$ git checkout -b new-local-branch upstream/master
fatal: 'upstream/master' is not a commit and a branch 'new-local-branch' cannot be created from it
I fixed the error by running git fetch upstream
and repeating step six from above to create the branch. I'm no git expert, but I think the "Create a new branch in your local clone" could also just be git checkout -b <branch-name>
as the upstream/master and local master branches should refer to the same commit at this point in the process.
I'm happy to submit a PR if warranted.
Metadata
Metadata
Assignees
Labels
No labels