Skip to content

Easily switch between fork and upstream #9671

Closed

Description

@mbtools

Description

It would be nice to get a button or link in the page header switching from a repo to my fork, and from my fork back to a repo.

To make this more useful, it should not be just a link to the repo/fork homepage but take the current navigation into consideration. For example, if I view PRs on my fork, then the link should lead to PRs of the main repo and vice versa.

Example

Suggested location of button/link would be in page header after the org/repo:

Main repo

Image

Fork

Image

PS: Parts of forked-to which was removed might be reused for this feature.

Example URLs

https://github.com/refined-github/refined-github
https://github.com/refined-github/refined-github/issues
https://github.com/refined-github/refined-github/pulls?q=sort%3Aupdated-desc+is%3Apr+is%3Aopen+
https://github.com/refined-github/refined-github/actions
https://github.com/refined-github/refined-github/... any

https://github.com/mbtools/refined-github
https://github.com/mbtools/refined-github/issues
https://github.com/mbtools/refined-github/pulls?q=sort%3Aupdated-desc+is%3Apr+is%3Aopen+
https://github.com/mbtools/refined-github/actions
https://github.com/mbtools/refined-github/... any

Activity

  1. fregante commented on Jun 1, 2026

    @fregante
    Member

    From the fork to the source is easy, we can linkify the fork icon in repo-header-info

    For the opposite way, we could use the logic suggested in #6291 (i.e. remember the fork after visiting it), but it's a little less straightforward since there's no single "go to fork of this repo" icon.

    The space in the header is limited (#9433) so we're not going to add more than a tiny icon.

  2. mbtools commented on Jun 1, 2026

    @mbtools
    Author

    Sounds good. Let's keep it simple. I would limit it to when you have exactly one fork.

    How about using the same button for both cases?

    Image

    This matches also the design of the buttons on the right side of the header. I nice hover text would make it clear what the button is for.

  3. fregante commented on Jun 1, 2026

    @fregante
    Member

    That would be confusing so that's not possible. If I opened this repo and saw a "fork" icon I'd be pretty spooked.

  4. mbtools commented on Jun 1, 2026

    @mbtools
    Author

    It could fit to the buttons on the right. On click, jump to fork. On drop-down, same menu as the fork button on repo home:

    Image
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions