LinuxCommandLibrary

gh-repo

Work with GitHub repositories on the command line.

TLDR

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]
copy


Clone a repository
$ gh repo clone [owner]/[repository]
copy


Fork and clone a repository
$ gh repo fork [owner]/[repository] --clone
copy


View a repository in the default web browser
$ gh repo view [repository] --web
copy


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]
copy


List only non-forks repositories and limit the number of repositories to list (default: 30)
$ gh repo list [owner] --source -L [limit]
copy


List repositories with a specific primary coding language
$ gh repo list [owner] --language [language_name]
copy

SYNOPSIS

gh repo <command> [flags]

DESCRIPTION

Work with GitHub repositories

COMMANDS

gh-repo-archive(1)

Archive a repository

gh-repo-clone(1)

Clone a repository locally

gh-repo-create(1)

Create a new repository

gh-repo-delete(1)

Delete a repository

gh-repo-edit(1)

Edit repository settings

gh-repo-fork(1)

Create a fork of a repository

gh-repo-list(1)

List repositories owned by user or organization

gh-repo-rename(1)

Rename a repository

gh-repo-sync(1)

Sync a repository

gh-repo-view(1)

View a repository

EXAMPLE

$ gh repo create
$ gh repo clone cli/cli
$ gh repo view --web

SEE ALSO

gh(1)

Copied to clipboard