LinuxCommandLibrary
GitHubF-DroidGoogle Play Store

hub-fork

creates a fork of a GitHub repository

TLDR

Fork current repository
$ hub fork
copy
Fork without remote
$ hub fork --no-remote
copy
Fork specific repository
$ hub fork [user/repo]
copy
Fork to organization
$ hub fork --org [myorg]
copy

SYNOPSIS

hub fork [options] [repository]

DESCRIPTION

hub fork creates a fork of a GitHub repository. It adds a remote pointing to your fork automatically.The command forks the repository detected in the current directory to your account or the specified organization, then adds a git remote for it (named origin by default, unless origin is already taken, in which case it uses your GitHub username).

PARAMETERS

--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 instead of your account.

INSTALL

sudo apt install hub
copy
sudo pacman -S hub
copy
sudo zypper install hub
copy
brew install hub
copy
nix profile install nixpkgs#hub
copy

CAVEATS

Part of hub, which is deprecated in favor of the official GitHub CLI (gh); use gh repo fork instead. Requires GitHub authentication.

HISTORY

hub fork is part of hub, GitHub's original command-line wrapper around git for repository operations, created in 2012.

SEE ALSO

hub(1), gh(1), hub-clone(1)

RESOURCES

Copied to clipboard
Kai