hub-fork(1)

hub-fork1

Fork the current repository on github and add a git remote for it.

Usage

hub fork [--no-remote] [--remote-name REMOTE] [--org ORGANIZATION]

Options

--no-remote

Skip adding a git remote for the fork.

--remote-name REMOTE

Set the name for the new git remote.

--org ORGANIZATION

Fork the repository within this organization.

Examples

$ hub fork
[ repo forked on GitHub ]
> git remote add -f USER [email protected]:USER/REPO.git
$ hub fork --org=ORGANIZATION
[ repo forked on GitHub into the ORGANIZATION organization]
> git remote add -f ORGANIZATION [email protected]:ORGANIZATION/REPO.git

Releases

5 releases since Debian 10 (Buster); the text changed 4 times.

  1. 10
  2. 11
  3. 12
  4. 13
  5. Arch

From hub 2.14.2-4 in Arch Linux 2026-11-01. Parsed by carta from the page's man source.