Skip to content

gh pr checkout should add author's fork to remotes #4968

@ahmetb

Description

@ahmetb

Describe the feature or problem you’d like to solve

GitHub does allow maintainers of repo to push more commits to the fork of the Pull Request author (if the author has checked the respective box on the PR, but let's say they do).

If I review a PR locally via gh pr checkout <number> command, and decide to push more commits, I cannot easily do that, I need to do:

  1. git remote -v, copy my remote URL
  2. Go back to the PR, copy the PRauthor's username
  3. Change my username with PR author's username
  4. git remote add <name> <modified-remote-url>

which is really cumbersome.

Proposed solution

prm tool has existed for a really long time https://github.com/ldez/prm and it solves this by automatically adding a git-remote for the checked out fork.

Having the same feature on gh would help a great deal. I don't see a downside other than having to clean some unused remotes every now and then, which are harmless regardless.

Additional context

I recommend trying out https://github.com/ldez/prm.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workingmore-info-neededMore info needed from user/contributor

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions