1
0
Fork 0
mirror of https://github.com/tldr-pages/tldr.git synced 2025-04-22 13:22:06 +02:00
tldr/pages/common/gh-repo.md
Daniel Kaczmarczyk 16535be64c
gh-repo: update command (#10765)
* gh-repo: update the command

The flags changed around listing source repositories. This change reflects that.

* Update pages/common/gh-repo.md

Co-authored-by: Jack Lin <blueskyson1401@gmail.com>

---------

Co-authored-by: Jack Lin <blueskyson1401@gmail.com>
2023-10-08 02:06:46 +02:00

32 lines
920 B
Markdown

# gh repo
> Work with GitHub repositories.
> 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 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}}`