Scroll to navigation

GCLI-FORKS(1) General Commands Manual GCLI-FORKS(1)

NAME

gcli forksManage repository forks in git forges

SYNOPSIS

gcli forks [-n n] [-y] [-s] [-o owner -r repo] actions...

gcli forks create [-o owner -r repo] -i target-owner

DESCRIPTION

Use gcli forks to manage forks of other repositories in various git(1) forges such as GitHub, GitLab and Gitea.

OPTIONS

, --owner owner
Operate on the repository of the given owner. This option can only be used in combination with -r.
, --repo repo
Operate on the given repository. This option can only be used in combination with -o.
, --yes
Do not ask for confirmation. Assume yes.
, --sorted
Reverse the output such that most recent items appear at the bottom.
, --into target-owner
When forking a repository, this is the organization or user the repository is forked into.
, --count n
Fetch at least n forks. Setting n to -1 will fetch all forks. Default: 30. Note that on repositories with many forks fetching all forks can take a considerable amount of time and may result in rate limiting by the respective API.

ACTIONS

actions... may be one or more of the following:

Delete the fork. You will be asked for confirmation unless you set -y.

The following flags can be specified:

, --repo
See OPTIONS
, --owner
See OPTIONS
, --yes
Do not ask for confirmation before deleting the fork. See OPTIONS.

EXAMPLES

Clone vim/vim and fork it into your account:

$ git clone git@github.com:vim/vim
$ cd vim
$ gcli forks create --into <myaccount>

This will ask you if you want to add a remote to your fork. In case you accept the offer, the origin remote will be renamed to upstream and a new origin will be pointed at your newly created fork. You may also want to setup a .gcli file at the same time:

$ printf -- "pr.upstream=vim/vim\npr.base=trunk\n" >> .gcli

Delete your fork of the current repository without confirmation:

$ gcli forks -y delete

SEE ALSO

git(1), gcli(1)

AUTHORS

Nico Sonack aka. herrhotzenplotz <nsonack@herrhotzenplotz.de> and contributors.

BUGS

Please report bugs via E-Mail to ~herrhotzenplotz/gcli-discuss@lists.sr.ht.

Alternatively you can report them on any of the forges linked at https://herrhotzenplotz.de/gcli. However, the preferred and quickest method is to use the mailing list.

2024-May-25 gcli 2.3.0