Linux command
gh-repo 命令
文本
复制后可按需替换文件名、目录或参数。
常用示例
Clone a repository
gh repo clone [owner]/[repo]
Create a new repository
gh repo create [name] --public
Fork a repository
gh repo fork [owner]/[repo]
View repository
gh repo view
List your repositories
gh repo list
说明
gh repo manages GitHub repositories from the command line. It provides repository creation, cloning, forking, and management without visiting github.com. The command supports both HTTPS and SSH cloning based on configuration. Repository creation includes options for visibility, description, license, and gitignore templates. Forking creates linked copies for contribution workflows.
参数
- clone _REPO_
- Clone a repository locally.
- create _NAME_
- Create a new repository.
- fork _REPO_
- Fork a repository.
- view _REPO_
- View repository details.
- list
- List accessible repositories.
- delete _REPO_
- Delete a repository.
- rename _NEW-NAME_
- Rename current repository.
- sync
- Sync fork with upstream.
- --public
- Make repository public.
- --private
- Make repository private.
- --help
- Display help information.
FAQ
What is the gh-repo command used for?
gh repo manages GitHub repositories from the command line. It provides repository creation, cloning, forking, and management without visiting github.com. The command supports both HTTPS and SSH cloning based on configuration. Repository creation includes options for visibility, description, license, and gitignore templates. Forking creates linked copies for contribution workflows.
How do I run a basic gh-repo example?
Run `gh repo clone [owner]/[repo]` in a terminal, then adjust file names, paths, flags, or remote targets for your system.
What does clone _REPO_ do in gh-repo?
Clone a repository locally.