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

Remote repository configured #893

Open
victorhsn opened this issue May 8, 2020 · 2 comments
Open

Remote repository configured #893

victorhsn opened this issue May 8, 2020 · 2 comments
Labels

Comments

@victorhsn
Copy link
Contributor

@victorhsn victorhsn commented May 8, 2020

When we're executing the command to create a repository, the following arguments are:

gh repo create name

After that the repository will be created on Github, however, when there is a remote track configured, I presume that CLI could print a message to the user showing that there is a remote setting. Instead it;

✓ Created repository OWNER/REPO on GitHub
fatal: remote origin already exists.
git: exit status 128

Proposed solution

Maybe we can print a message with options Y/N to continue.

YES argument

There is a remote URL configured, do you want to create the repo?
✓ Created repository OWNER/REPO on GitHub

NO argument
exit from CLI.

@mislav
Copy link
Member

@mislav mislav commented May 11, 2020

Thank you for the feedback! If I understand, you are suggesting that we ask the user what gh should do in case you called gh repo create and you are already in a git repository that has a git remote called "origin"?

@victorhsn
Copy link
Contributor Author

@victorhsn victorhsn commented May 12, 2020

@mislav, exactly. Because with the message fatal: remote origin already exists. as showing for the user and the repo will be created on Github, I believe that it can be unclear for the user at that moment.

Imagine that I'm using the gh repo create name and browsing in a path called /project/gh, but there is a git remote configured at the directory, the new repository will be created on Github, all right? But not remote configured, I need to change the directory, create another one, init the git and set remote URL.

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

Successfully merging a pull request may close this issue.

None yet
2 participants
You can’t perform that action at this time.