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
After moving repo to a new org, pr create
adds a new remote named fork
every time
#9002
Comments
Interesting. Before we dig too deep can you share the contents of I believe we only intend to use |
Looking at the code you pointed out I found the issue: my repo has been transferred to a new organisation, and |
pr create
adds a new remote named fork
every time
Ah, that makes a lot of sense and was reproducible for me:
I've updated the title to reflect this for better discoverability. I'm not totally sure what we should do about this use case. Something similar was reported in #345. It seems like we could do something here aside from asking the user to update their remotes. When we start the process of gathering data for
And the API knows that this repository
Which we use to present the dialog, and use as the information for the remote to be added. I wonder we could understand that I haven't dug into the details to confirm how hard this would be since the code looks pretty thorny, and this can also be addressed client side by updating the remote so it seems low priority. Tagging it |
Describe the bug
Each time I create a PR using gh-cli, a new git remote named 'fork' is added to my config.
Steps to reproduce the behavior
$ gh pr create
? Where should we push the 'xxx' branch?
Creating pull request for xxx in user/repo
? Title
? Body
? What's next? Submit
Added user/repo as remote "fork"
Expected vs actual behavior
I creating a PR on my repo, my git config already has the remote named
origin
, gh-cli should not create a new remote namedfork
joining to the same url thanorigin
The text was updated successfully, but these errors were encountered: