Skip to content

Clicking the "Fork" button for a repo with an existing fork should either bring the user to their fork or notify that a fork exists on the "Create fork" page #10316

Closed

Description

@whisperity

Description

Existing behaviour

If logged in to GitHub, there is an arrow button next to the Fork button that shows "your forks" for that repository/hierarchy. (This seems to be stock GitHub behaviour.)

Drop-down when a fork exists Drop-down when a fork does not exist

Often I find myself wanting to navigate between parent and fork, and having to click the arrow button just to find my fork and click again to go to it feels unnatural and clunky: the Fork button itself is much bigger and more easily accessible.1

However, clicking on Fork brings one to /fork, which is the Create a new fork interface.
Once having reached this interface:

  1. The fact that you already have a fork disappears. There is a link to View existing forks, which goes to /forks, but that's the list of all forks, and loading that page can take a lot of time on large families.
  2. In the Choose an owner drop-down, your own user is greyed out anyway, because a single user can only own a single fork in a repo family. It is no longer possible to organically (clicking something) get to my fork from here. (I do see some organisations here, however.)
Main user disabled as fork owner for new forks when already having a fork

Suggestion

My suggestion is to implement the following:

  1. Clicking on Fork should immediately go to your fork (if such exists), otherwise retain the behaviour of going to the /fork (Create a new fork) page.
  2. The downwards arrow drop-down next to Fork on a repo's page should be hidden in case the user has no forks.
  3. On the Create a new fork page, the Owner drop-down should auto-select your user (it is most likely that someone makes a personal fork, not an organisation fork)
  4. On the Create a new fork page, in addition to the "View existing forks" link, a "[Go to your fork]." link should appear pointing to https://github.com/<your-user>/<repo>, if such exists.

2.: Repo header with no forks: no drop-down arrow, and if possible, maybe the Fork button could have a tool-tip like Star saying "Create a fork of /".

MOCK: Header for repos without a fork

2.: Repo header with a fork: a drop-down exists like normally. The Fork button should get a tool-tip saying "Go to /", and do that when clicked.

MOCK: Header for repos with a fork

Extra

As an additional visual improvement to the /fork page, we could also considering removing all "(insufficient permission)" and "(fork already exists)" organisations that are already <disabled> from the drop-down visually. I.e., going from this:

Forking llvm/llvm-project showing that a fork already exists under whisperity/llvm-project and that llvm already has 'llvm-project' and I have no rights to create forks in that organisation

to this:

MOCK fork interface for llvm/llvm-project showing the only possible owner where I can make a fork (no fork already, have permissions)

Example URLs

https://github.com/refined-github/refined-github and https://github.com/refined-github/refined-github/fork

Footnotes

  1. and back when I started using GitHub, this drop-down didn't even exist, and clicking the Fork button used to start the forking process… ↩

Activity

  1. fregante commented on Oct 22, 2026

    @fregante
    Member

    We used to have a feature called forked-to that we removed once GitHub added the dropdown:

    I think at this point the fundamental piece of information missing is whether your fork exists before clicking the dropdown.

    IMO all we need to do is drop the one-click "Fork" button in place of always opening the dropdown in the first click. From there the user can pick an existing fork or create a new one as needed.

    This should reduce the cognitive cost of deciding which button to click first; the only price to pay is that the rare "Create fork" action now requires one more click.

  2. fregante commented on Oct 23, 2026

    @fregante
    Member

    logged-in DOM for agents:

    <div class="prc-ButtonGroup-ButtonGroup-vFUrY" data-component="ButtonGroup">
    	<div class="prc-ButtonGroup-Item-PqvDl">
    		<a data-component="Button" type="button" href="/refined-github/refined-github/fork" data-testid="fork-button" aria-label="Fork your own copy of refined-github/refined-github" class="prc-Button-ButtonBase-9n-Xk" data-loading="false" data-size="small" data-variant="default">
    			<span data-component="buttonContent" data-align="center" class="prc-Button-ButtonContent-Iohp5">
    				<span data-component="leadingVisual" class="prc-Button-Visual-YNt2F prc-Button-LeadingVisual-UySKu prc-Button-VisualWrap-E4cnq">
    				</span>
    				<span data-component="text" class="prc-Button-Label-FWkx3">
    					Fork
    					<span aria-hidden="true" data-variant="secondary" data-component="CounterLabel" class="ml-1 prc-CounterLabel-CounterLabel-X-kRU">
    						<span>1.9k</span>
    					</span>
    					<span class="prc-VisuallyHidden-VisuallyHidden-Q0qSB">
    						&nbsp;(
    						<span>1.9k</span>
    						)
    					</span>
    				</span>
    			</span>
    		</a>
    	</div>
    	<div class="prc-ButtonGroup-Item-PqvDl">
    		<button data-component="IconButton" type="button" data-testid="fork-dropdown-button" aria-haspopup="true" aria-expanded="false" tabindex="0" class="prc-Button-ButtonBase-9n-Xk prc-Button-IconButton-fyge7" data-loading="false" data-no-visuals="true" data-size="small" data-variant="default" aria-labelledby="_r_h_" id="_r_e_" style="anchor-name: --anchored-overlay-anchor-_r_g_;">
    		</button>
    		<span class="prc-TooltipV2-Tooltip-tLeuB" data-direction="s" data-component="Tooltip" aria-hidden="true" id="_r_h_" popover="auto" style="top: 152px; left: 925.375px;">See your forks of this repository</span>
    	</div>
    </div>
    
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