Skip to content
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

FR: set upstream remote when cloning a forked repo. #811

Open
xu-cheng opened this issue Feb 17, 2015 · 5 comments · May be fixed by #1977
Open

FR: set upstream remote when cloning a forked repo. #811

xu-cheng opened this issue Feb 17, 2015 · 5 comments · May be fixed by #1977
Labels

Comments

@xu-cheng
Copy link

I hope hub can automatically set the upstream remote of my forked repo during git clone.

@mislav mislav added the feature label Sep 27, 2015
@mislav
Copy link
Owner

mislav commented Sep 27, 2015

Yes, that might be useful. Thanks for the suggestion!

Also see #471

@Mte90
Copy link

Mte90 commented May 3, 2016

any news for this feature?

@mislav
Copy link
Owner

mislav commented May 3, 2016

No news but this has been on my mind to improve the clone and fork set of commands in one go regarding their handling and naming of remotes. I will update here if I've done any work on this, and in the meantime anyone is free to send a proposed improvement. The best way to start a contribution is to first discuss the planned change somewhere so we can review it and 👍 if the idea makes sense.

@mislav
Copy link
Owner

mislav commented Jan 26, 2019

See #1977

@bbugh
Copy link

bbugh commented Jun 4, 2021

FYI, the other(?) official(?) github cli can currently do this. It will rename the current origin to upstream and add your fork as the origin.

You can do it with a Y/n prompt:

>> gh repo fork
✓ Created fork bbugh/somewhere
? Would you like to add a remote for the fork? Yes
✓ Added remote origin

Or specify --remote to do it without prompt.

>> gh repo fork --remote

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

5 participants
@mislav @Mte90 @bbugh @xu-cheng and others