GH-REPO-EDIT(1)
π gh-repo-edit β the GitHub CLI manual, but make it make sense β¨
okay so this is gh-repo-edit, straight out of the GitHub CLI manual, and it's literally the glow-up button for your repo settings. bestie, we're about to redecorate π
πΈ NAME πΈ
gh-repo-edit β Edit repository settings. that's it, that's the vibe. β¨
π¦ SYNOPSIS π¦
gh repo edit [<repository>] [flags]
π DESCRIPTION π
Edit repository settings. yes, all of them. it's giving makeover montage π
so here's a thing you need to know β and i'm saying this with my whole chest β to toggle a setting off, you use the --<flag>=false syntax. like --enable-projects=false. capital-n No Cap.
now, the spicy part πΆοΈ β changing repository visibility can have unexpected consequences, including but not limited to:
- Losing stars and watchers, affecting repository ranking π
- Detaching public forks from the network
- Disabling push rulesets
- Allowing access to GitHub Actions history and logs
when the --visibility flag is used, the --accept-visibility-change-consequences flag is required. like, you cannot skip that one. it's the terms-and-conditions checkbox but real.
for info on all the potential consequences, see <https://gh.io/setting-repository-visibility> β yes i'm linking you, go read it π«Ά
also!! when the --enable-squash-merge flag is used, --squash-merge-commit-message can be used to change the default squash merge commit message behavior:
default: uses commit title and message for 1 commit, or pull request title and list of commits for 2 or morepr-title: uses pull request titlepr-title-commits: uses pull request title and list of commitspr-title-description: uses pull request title and description
iconic behavior honestly π
β¨ OPTIONS β¨
every single flag, right here, no skipping, i would never π
--accept-visibility-change-consequencesβ Accept the consequences of changing the repository visibility. the adulting flag π«‘--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-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 β οΈ (it's a combo move, you can't skip step one)--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--squash-merge-commit-message <string>β 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 <string>β Change the visibility of the repository to{public,private,internal}
π₯ EXIT CODES π₯
so when the command wraps up, here's what the numbers mean, and honestly? know them. iykyk π
0: Successful execution β slay π1: Error β it's giving oops2: Command canceled β you changed your mind, valid4: Authentication required β log in bestie π
NOTE: Specific commands may have additional exit codes. Refer to the command's help for more information.
π EXAMPLE π
real code, verbatim, no cap:
# Enable issues and wiki
$ gh repo edit --enable-issues --enable-wiki
# Disable projects
$ gh repo edit --enable-projects=false
see that =false? that's the off-switch, that's the whole trick π
π§ SEE ALSO π§
gh-repo(1)β go meet the parent command, she's lovely
and that's the page!! GitHub CLI v2.102.0, dated Oct 2026, written by your fave, delivered with love ππ«Ά
π¦ where this page comes from
- opensuse-leap 16.0: gh 2.102.0-bp160.1.1 Β· MIT
- opensuse-leap 16.0: gh 2.102.0-bp160.1.1 Β· MIT
- opensuse-leap 16.0: gh 2.102.0-bp160.1.1 Β· MIT
- opensuse-leap 16.0: gh 2.102.0-bp160.1.1 Β· MIT
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms