glab repo update api-gateway --defaultBranch main

Category: GitLab

glab repo update api-gateway --defaultBranch main

Change the default branch of a repository

Updates project settings such as the default branch for the api-gateway project. The same command changes the description with --description and archives or unarchives with the --archive flag. Run it from inside the repo to target the current project without naming it.
Looking for more? Search all 7,657 commands — works offline, in English or Spanish, and fixes typos.