GH-REPO-EDIT(1) GitHub CLI manual GH-REPO-EDIT(1) NAME gh-repo-edit - Edit repository settings SYNOPSIS gh repo edit [] [flags] DESCRIPTION Edit repository settings. To toggle a setting off, use the --=false syntax. Changing repository visibility can have unexpected consequences including but not limited to: o Losing stars and watchers, affecting repository ranking o Detaching public forks from the network o Disabling push rulesets o Allowing access to GitHub Actions history and logs When the --visibility flag is used, --accept-visibility-change- consequences flag is required. For information on all the potential consequences, see . When the --enable-squash-merge flag is used, --squash-merge-commit- message can be used to change the default squash merge commit message behavior: o default: uses commit title and message for 1 commit, or pull request title and list of commits for 2 or more o pr-title: uses pull request title o pr-title-commits: uses pull request title and list of commits o pr-title-description: uses pull request title and description OPTIONS --accept-visibility-change-consequences Accept the consequences of changing the repository visibility --add-topic Add repository topic --allow-forking Allow forking of an organization repository --allow-update-branch Allow a pull request head branch that is behind its base branch to be updated --default-branch Set the default branch name for the repository --delete-branch-on-merge Delete head branch when pull requests are merged -d, --description Description of the repository --enable-advanced-security Enable advanced security in the repository --enable-auto-merge Enable auto-merge functionality --enable-discussions Enable discussions in the repository --enable-issues Enable issues in the repository --enable-merge-commit Enable merging pull requests via merge commit --enable-projects Enable projects in the repository --enable-rebase-merge Enable merging pull requests via rebase --enable-secret-scanning Enable secret scanning in the repository --enable-secret-scanning-push-protection Enable secret scanning push protection in the repository. Secret scanning must be enabled first --enable-squash-merge Enable merging pull requests via squashed commit --enable-wiki Enable wiki in the repository -h, --homepage Repository home page URL --remove-topic Remove repository topic --squash-merge-commit-message The default value for a squash merge commit message: {default|pr-title|pr-title-commits|pr-title-description} --template Make the repository available as a template repository --visibility Change the visibility of the repository to {public,private,internal} EXIT CODES 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. EXAMPLE # Enable issues and wiki $ gh repo edit --enable-issues --enable-wiki # Disable projects $ gh repo edit --enable-projects=false SEE ALSO gh-repo(1) Mar 2026 GH-REPO-EDIT(1)