tftsr-devops_investigation/gh_2.63.0_linux_amd64/share/man/man1/gh-repo-set-default.1

76 lines
1.4 KiB
Groff
Raw Normal View History

.nh
.TH "GH-REPO-SET-DEFAULT" "1" "Nov 2024" "GitHub CLI 2.63.0" "GitHub CLI manual"
.SH NAME
gh-repo-set-default - Configure default repository for this directory
.SH SYNOPSIS
\fBgh repo set-default [<repository>] [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