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

Commands to manage remotes #6925

Closed
9999years opened this issue Jan 28, 2023 · 4 comments
Closed

Commands to manage remotes #6925

9999years opened this issue Jan 28, 2023 · 4 comments
Labels
enhancement a request to improve CLI needs-user-input

Comments

@9999years
Copy link

I'd like to be able to manage my remotes with the gh tool.

For instance, gh remote add cli/cli (or similar) could be equivalent to git remote add cli git@github.com:cli/cli.git. Ideally such a command could respect the user's choice of protocol.

This would save me from opening a web browser to press the clone button and copy the URL. I could 'simply' memorize the URL format and type it in, but I am lazy and gh has tab completion. :)

(N.b. the soft-deprecated hub tool also doesn't provide tools for managing remotes.)

@9999years 9999years added the enhancement a request to improve CLI label Jan 28, 2023
@cliAutomation cliAutomation added the needs-triage needs to be reviewed label Jan 28, 2023
@samcoe
Copy link
Contributor

samcoe commented Jan 29, 2023

@9999years I don't think adding a command for managing git remotes belongs in gh as it is not meant to be a git wrapper but rather a tool to use in conjunction with it. Having said that gh does have the repo clone command which will properly set up git remotes for you. Have you tried using that?

@samcoe samcoe added needs-user-input and removed needs-triage needs to be reviewed labels Jan 29, 2023
@9999years
Copy link
Author

Yes, I use gh repo clone frequently! However, gh repo clone cannot add a remote to an existing repository (most frequently I want to add another remote when there's a new fork I want to pull from).

@samcoe
Copy link
Contributor

samcoe commented Jan 31, 2023

@9999years I understand better now, thanks for clarifying. Do you think #1027 covers the feature you are looking for? If so I think we can close this one out as it is already being tracked in the other issue.

@9999years
Copy link
Author

Sure, that's close enough.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement a request to improve CLI needs-user-input
Projects
None yet
Development

No branches or pull requests

3 participants