GSP
Quick Navigator

Search Site

Unix VPS
A - Starter
B - Basic
C - Preferred
D - Commercial
MPS - Dedicated
Previous VPSs
* Sign Up! *

Support
Contact Us
Online Help
Handbooks
Domain Status
Man Pages

FAQ
Virtual Servers
Pricing
Billing
Technical

Network
Facilities
Connectivity
Topology Map

Miscellaneous
Server Agreement
Year 2038
Credits
 

USA Flag

 

 

Man Pages
GH-REPO-SET-DEFAULT(1) GitHub CLI manual GH-REPO-SET-DEFAULT(1)

gh-repo-set-default - Configure default repository for this directory

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

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

Unset the current default repository

View the current default repository

0: Successful execution

1: Error

2: Command canceled

4: Authentication required

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

# 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

gh-repo(1)

Jul 2025

Search for    or go to Top of page |  Section 1 |  Main Index

Powered by GSP Visit the GSP FreeBSD Man Page Interface.
Output converted with ManDoc.