gh-repo - Man Page
Manage repositories
Examples (TL;DR)
- Create a new repository (if the repository name is not set, the default name will be the name of the current directory):
gh repo create name
- Clone a repository:
gh repo clone owner/repository
- Fork and clone a repository:
gh repo fork owner/repository --clone
- View a repository in the default web browser:
gh repo view repository --web
- List repositories owned by a specific user or organization (if the owner is not set, the default owner will be the currently logged in user):
gh repo list owner
- List only non-forks repositories and limit the number of repositories to list (default: 30):
gh repo list owner --source -L limit
- List repositories with a specific primary coding language:
gh repo list owner --language language_name
Synopsis
gh repo <command> [flags]
Description
Work with GitHub repositories.
General Commands
- gh-repo-create(1)
Create a new repository
- gh-repo-list(1)
List repositories owned by user or organization
Targeted Commands
- gh-repo-archive(1)
Archive a repository
- gh-repo-clone(1)
Clone a repository locally
- gh-repo-delete(1)
Delete a repository
- gh-repo-deploy-key(1)
Manage deploy keys in a repository
- gh-repo-edit(1)
Edit repository settings
- gh-repo-fork(1)
Create a fork of a repository
- gh-repo-rename(1)
Rename a repository
- gh-repo-set-default(1)
Configure default repository for this directory
- gh-repo-sync(1)
Sync a repository
- gh-repo-unarchive(1)
Unarchive a repository
- gh-repo-view(1)
View a repository
Example
$ gh repo create $ gh repo clone cli/cli $ gh repo view --web
See Also
Referenced By
gh(1), gh-repo-archive(1), gh-repo-clone(1), gh-repo-create(1), gh-repo-delete(1), gh-repo-deploy-key(1), gh-repo-edit(1), gh-repo-fork(1), gh-repo-list(1), gh-repo-rename(1), gh-repo-set-default(1), gh-repo-sync(1), gh-repo-unarchive(1), gh-repo-view(1).
Jul 2024 GitHub CLI manual