Skip site navigation (1)Skip section navigation (2)

  
 
  

home | help
GH-REPO-SET-DEFAULT(1)		GitHub CLI manual	  GH-REPO-SET-DEFAULT(1)

NAME
     gh-repo-set-default - 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:

     * viewing and creating pull requests

     * viewing and creating issues

     * viewing and creating releases

     * working with GitHub Actions

   NOTE: gh does not use the default repository for managing repository and  en-
     vironment secrets.
OPTIONS
     -u, --unset
	    Unset the current default repository

     -v, --view
	    View the current default repository

EXIT CODES
     0: Successful execution

     1: Error

     2: Command canceled

     4: Authentication required

     NOTE:  Specific  commands may have additional exit codes. Refer to the com-
     mand's help for more information.

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)

				    Aug 2026		  GH-REPO-SET-DEFAULT(1)

Want to link to this manual page? Use this URL:
<https://man.freebsd.org/cgi/man.cgi?query=gh-repo-set-default&sektion=1&manpath=FreeBSD+Ports+15.1.quarterly>

home | help