create-fork
Start an asynchronous fork of a repo
Auth
Authenticated
Examples
ghit-cli create-fork website --slug website-fork
# or
# ghit-cli create-fork teams/platform/website --owner-team-slug forks --slug website-fork
# wait until the fork finishes
ghit-cli create-fork website --slug website-fork --wait
# wait up to 60 seconds
ghit-cli create-fork website --slug website-fork --wait 60s
Expected Response
Without --wait, prints the created fork status JSON in pending. With --wait, polls until the final completed or failed status and prints that final JSON.
Errors
400 Bad Requestfor invalid flags/values.404 Not Foundwhen referenced owners/resources are missing.409 Conflictfor uniqueness or state conflicts.
Common auth errors are documented on the CLI overview page.
Help Output
Create a fork of a repo
Usage: ghit-cli create-fork [OPTIONS] <REPO>
Arguments:
<REPO> Upstream repo locator (`teams/<team_slug>/<repo_slug>` or `<username>/<repo_slug>`), or `<repo_slug>` for authenticated user
Options:
--owner-team-slug <OWNER_TEAM_SLUG>
Fork owner team slug (optional)
--name <NAME>
Fork repo name (optional)
--slug <SLUG>
Fork repo slug (optional)
--visibility <VISIBILITY>
Fork repo visibility (optional) [possible values: public, private]
--wait [<WAIT>]
Wait for the fork to finish. Pass a timeout like `60s`, or omit the value to wait forever
-h, --help
Print help