Skip to content
[ 03 ]Commands

copia-cli repo set-default

copia-cli repo set-default [<repository>] [flags]

Set the default repository of the local git repository.

copia-cli uses the default repository for the commands that work on the current repository, such as issue, pr, label and release. It is stored as the git config key remote.<name>.copia-resolved on the remote that points to it, and wins over the remote "origin". The -R flag still wins over both.

The repository is given as owner/repo or as the name of a git remote. Without an argument the only remote is used; with several remotes the command fails and lists them.

Options

-u, --unset
Unset the current default repository
-v, --view
View the current default repository

Options inherited from parent commands

--host <string>
Target Copia host
-R, --repo <string>
Select repository (owner/repo)
--token <string>
Authentication token

Examples

# Set a repository explicitly
$ copia-cli repo set-default my-org/my-repo

# Set a repository using a git remote name
$ copia-cli repo set-default upstream

# View the current default repository
$ copia-cli repo set-default --view

# Remove the default repository
$ copia-cli repo set-default --unset

See also