gh-repo-set-default - Man Page

Configure default repository for this directory

Synopsis

gh repo set-default [<repository>] [flags]

Description

This command sets the default remote repository to use when querying the GitHub API for the locally cloned repository.

gh uses the default repository for things like:

Options

-u, ā€‰--unset

unset the current default repository

-v, ā€‰--view

view the current default repository

Example

Interactively select a default repository:
$ gh repo set-default

Set a repository explicitly:
$ gh repo set-default owner/repo

View the current default repository:
$ gh repo set-default --view

Show more repository options in the interactive picker:
$ git remote add newrepo https://github.com/owner/repo
$ gh repo set-default

See Also

gh-repo(1)

Referenced By

gh-repo(1).

Jul 2024 GitHub CLI manual