gcli-forks1
Manage repository forks in git forges
Usage
gcli [-n
n]
[-y]
[-s]
[-o
owner
-r
repo]
actions ...
gcli create
[-o
owner
-r
repo]
-i
target-owner
Overview
Use gcli to manage forks of other repositories in various git(1) forges such as GitHub, GitLab and Gitea.
Options
-
-o, --owner owner -
Operate on the repository of the given owner. This option can only be used in combination with
-r. -
-r, --repo repo -
Operate on the given repository. This option can only be used in combination with
-o. -
-y, --yes -
Do not ask for confirmation. Assume yes.
-
-s, --sorted -
Reverse the output such that most recent items appear at the bottom.
-
-i, --into target-owner -
When forking a repository, this is the organization or user the repository is forked into.
-
-n, --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-
Delete the fork. You will be asked for confirmation unless you set
-y.The following flags can be specified:
-r,--repo-
See OPTIONS
-o,--owner-
See OPTIONS
-y,--yes-
Do not ask for confirmation before deleting the fork. See OPTIONS.
Examples
Clone vim/vim and fork it into your account:
$ git clone [email protected]: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