You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
AFAICT there is no difference between the first two but when I use those it asks me for user/password whenever I try to push something, whereas if I use the third way it doesn't.
Is there a preferred form that we should use in the devguide? Are there other differences that should be noted? Do contributors and core devs use the same URL?
The second form is the one GitHub offers for "Clone with HTTPS", while the last is the one it offers for "Clone with SSH", so I think it makes sense to stick with recommending those two and suggest:
the HTTPS form for "read-only" clones
the SSH form for "read-write" clones
The default recommended flow would then be:
Fork the cpython repo through the GitHub UI
Clone your fork:
git clone git@github.com:<your GitHub user name>/cpython.git
Add a read-only upstream remote:
cd cpython
git remote add upstream https://github.com/python/cpython.git
git fetch upstream
Folks following the "lazy fork" model just reverse the roles of the two URLs:
Clone the upstream repository directly:
git clone https://github.com/python/cpython.git
Fork the cpython repo through the GitHub UI
Add a read-write pr remote:
cd cpython
git remote add pr git@github.com:<your GitHub user name>/cpython.git
Note that technically we don't have "read-write" clones anymore since we can't push directly to any branches on python/cpython. In any case, +1 for making the upstream (python/cpython)-origin (yourfork/cpython) model the default recommendation.
It works better behind a proxy (corporate proxies often don't allow custom protocols like git).
You're using a consistent form for everything.
The https form prompts for a password each time, but you can set up a git credential manager to address that (Windows git comes with git credential manager as part of the install).
I like how GitLab recommends getting a local copy of a pull request (which they call merge requests). They recommend using git fetch to grab the branch, then git co -b <name> FETCH_HEAD to check the branch out. I just fine it more intuitive, and easier to rebase locally, etc. Just FYI.
Activity
[-]Preferred cloning url[/-][+]Preferred cloning URL[/+]ncoghlan commentedon Feb 23, 2017
The second form is the one GitHub offers for "Clone with HTTPS", while the last is the one it offers for "Clone with SSH", so I think it makes sense to stick with recommending those two and suggest:
The default recommended flow would then be:
Fork the cpython repo through the GitHub UI
Clone your fork:
Add a read-only
upstreamremote:Folks following the "lazy fork" model just reverse the roles of the two URLs:
Clone the upstream repository directly:
Fork the cpython repo through the GitHub UI
Add a read-write
prremote:berkerpeksag commentedon Feb 23, 2017
Note that technically we don't have "read-write" clones anymore since we can't push directly to any branches on python/cpython. In any case, +1 for making the upstream (python/cpython)-origin (yourfork/cpython) model the default recommendation.
ncoghlan commentedon Feb 23, 2017
By read-write clones, I was referring to clones-of-your-fork, vs read-only clones of the primary repo.
pfmoore commentedon Feb 23, 2017
Advantages of the https form:
The https form prompts for a password each time, but you can set up a git credential manager to address that (Windows git comes with git credential manager as part of the install).
warsaw commentedon Feb 23, 2017
I like how GitLab recommends getting a local copy of a pull request (which they call merge requests). They recommend using
git fetchto grab the branch, thengit co -b <name> FETCH_HEADto check the branch out. I just fine it more intuitive, and easier to rebase locally, etc. Just FYI.E.g. from a Mailman MR:
I usually substitute something shorter for the
-boption, e.g.-b issue1234willingc commentedon Feb 25, 2017
Clone your fork. Choose one of the following:
SSH (when you have an SSH key set up for GitHub)
HTTPS (when you do not have an SSH key set up or you are behind a proxy)
willingc commentedon Mar 19, 2018
Closed by #140