gh-repo-edit - Man Page

Edit repository settings

Synopsis

gh repo edit [<repository>] [flags]

Description

Edit repository settings.

To toggle a setting off, use the --<flag>=false syntax.

Changing repository visibility can have unexpected consequences including but not limited to:

When the --visibility flag is used, --accept-visibility-change-consequences flag is required.

For information on all the potential consequences, see  ⟨https://gh.io/setting-repository-visibility

Options

--accept-visibility-change-consequences

Accept the consequences of changing the repository visibility

--add-topic <strings>

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 <name>

Set the default branch name for the repository

--delete-branch-on-merge

Delete head branch when pull requests are merged

-d, --description <string>

Description of 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-squash-merge

Enable merging pull requests via squashed commit

--enable-wiki

Enable wiki in the repository

-h, --homepage <URL>

Repository home page URL

--remove-topic <strings>

Remove repository topic

--template

Make the repository available as a template repository

--visibility <string>

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)

Referenced By

gh-repo(1).

Dec 2024 GitHub CLI manual