Skip to content

gh pr create fork helper behavior differs from gh repo fork #4627

Description

@matschaffer

Describe the feature or problem you’d like to solve

Today I ran gh pr create on a repo I hadn't yet forked and decided to use the "create fork" option.

I was surprised to find that this added my fork as fork and left the upstream as origin.

❯ git remote                     
fork
origin

After using gh repo fork for so long I would have expected it to switch origin to upstream and place my fork as origin.

Proposed solution

Modify the gh pr create fork helper to use the same behavior as gh repo fork and offer the option to move your personal fork to origin.

Additional context

I was able to work around this by running this after creating my PR:

git remote rm fork
gh repo fork

So it's not a big issue, but the behavior definitely surprised me.

Activity

  1. matschaffer commented on Dec 6, 2021

    @matschaffer
    ContributorAuthor

    This bit me again today. Glad I filed it 😆

  2. added
    discussFeature changes that require discussion primarily among the GitHub CLI team
    on May 9, 2023
  3. removed
    discussFeature changes that require discussion primarily among the GitHub CLI team
    on Jun 19, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

enhancementa request to improve CLIhelp wantedContributions welcome

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions