1
0
Fork 0
mirror of https://github.com/tldr-pages/tldr.git synced 2025-04-22 09:02:08 +02:00
tldr/pages/common/gh-repo.md
bl-ue 8ebd171d6f
*: fix typos reported by Hunspell (#5848)
Co-authored-by: marchersimon <50295997+marchersimon@users.noreply.github.com>
Co-authored-by: Seth Falco <seth@falco.fun>
Co-authored-by: Patrice Denis <patricedenis@users.noreply.github.com>
2021-05-20 16:13:41 -04:00

863 B

gh repo

Work with GitHub repositories on the command-line. More information: https://cli.github.com/manual/gh_repo.

  • 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 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:

gh repo list {{owner}} --non-forks

  • List repositories with a specific primary coding language:

gh repo list {{owner}} --language {{language_name}}