.nh .TH "GH-REPO-SET-DEFAULT" "1" "Oct 2024" "GitHub CLI 2.58.0" "GitHub CLI manual" .SH NAME gh-repo-set-default - Configure default repository for this directory .SH SYNOPSIS \fBgh repo set-default [] [flags]\fR .SH DESCRIPTION This command sets the default remote repository to use when querying the GitHub API for the locally cloned repository. .PP gh uses the default repository for things like: .IP \(bu 2 viewing and creating pull requests .IP \(bu 2 viewing and creating issues .IP \(bu 2 viewing and creating releases .IP \(bu 2 working with GitHub Actions .IP \(bu 2 adding repository and environment secrets .SH OPTIONS .TP \fB-u\fR, \fB--unset\fR unset the current default repository .TP \fB-v\fR, \fB--view\fR view the current default repository .SH EXIT CODES 0: Successful execution .PP 1: Error .PP 2: Command canceled .PP 4: Authentication required .PP NOTE: Specific commands may have additional exit codes. Refer to the command's help for more information. .SH EXAMPLE .EX 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 .EE .SH SEE ALSO \fBgh-repo(1)\fR