git 和 Github CLI 或 gh 有什么区别?
What is the difference between git and Github CLI or gh?
git
和 GitHub CLI 有什么区别?
我应该使用哪一个,git
或 GitHub CLI 或 gh
视情况而定?
例如,克隆一个存储库,两者都 commands support 它。是什么赋予了?
我特别要求 GitHub CLI 而不是 GitHub 本身。
git
用于 git 通常您可以使用 Bitbucket 或 GitLab 任何提供它的提供商,您只需添加远程即可推送。
但 Github CLI 适用于 Github 您可以从 CLI 管理 Github 的许多功能,例如问题。
我个人更喜欢 git,因为我更舒服,而且在许多办公室我不使用 Github。 https://git-scm.com/docs/git-remote.html#_examples
自 2021 年 9 月以来,另一个区别是它的可扩展性。
Creating GitHub CLI extensions
GitHub CLI extensions are custom GitHub CLI commands that anyone can create and use. For more information about how to use GitHub CLI extensions, see "Using GitHub CLI extensions"
You need a repository for each extension that you create. The repository name must start with gh-. The rest of the repository name is the name of the extension. At the root of the repository, there must be an executable file with the same name as the repository. This file will be executed when the extension is invoked.
虽然您可以使用 git
命令创建别名,但您现在可以使用 gh 扩展名创建复杂的命令。
如前所述 gh
用于 GitHub,字面上的描述是:
Work seamlessly with GitHub from the command line.
关于克隆仓库的类似命令(我好像记得我问的是什么):
git clone
比 gh repo clone
(gh repo clone OWNER/REPO
) 的语法更有限
- 使用
gh repo clone
克隆一个分支并自动添加 GitHub 上游存储库
git
和 GitHub CLI 有什么区别?
我应该使用哪一个,git
或 GitHub CLI 或 gh
视情况而定?
例如,克隆一个存储库,两者都 commands support 它。是什么赋予了?
我特别要求 GitHub CLI 而不是 GitHub 本身。
git
用于 git 通常您可以使用 Bitbucket 或 GitLab 任何提供它的提供商,您只需添加远程即可推送。
但 Github CLI 适用于 Github 您可以从 CLI 管理 Github 的许多功能,例如问题。
我个人更喜欢 git,因为我更舒服,而且在许多办公室我不使用 Github。 https://git-scm.com/docs/git-remote.html#_examples
自 2021 年 9 月以来,另一个区别是它的可扩展性。
Creating GitHub CLI extensions
GitHub CLI extensions are custom GitHub CLI commands that anyone can create and use. For more information about how to use GitHub CLI extensions, see "Using GitHub CLI extensions"
You need a repository for each extension that you create. The repository name must start with gh-. The rest of the repository name is the name of the extension. At the root of the repository, there must be an executable file with the same name as the repository. This file will be executed when the extension is invoked.
虽然您可以使用 git
命令创建别名,但您现在可以使用 gh 扩展名创建复杂的命令。
如前所述 gh
用于 GitHub,字面上的描述是:
Work seamlessly with GitHub from the command line.
关于克隆仓库的类似命令(我好像记得我问的是什么):
git clone
比gh repo clone
(gh repo clone OWNER/REPO
) 的语法更有限
- 使用
gh repo clone
克隆一个分支并自动添加 GitHub 上游存储库