Github:如何在不去 github 的情况下在 VS Code 中远程创建 github 存储库

Github: How to create a github repo in VS Code remotely without going to github

我只是好奇。在 XCode 中,我可以远程创建一个 github 存储库,而无需去 github。

在 VS Code 中做同样的事情怎么样?通常我们会先去github创建repo然后使用给定的命令行推送到github.

这一切都可以在 VS Code 中远程完成吗?

Xcode 可能只是在使用 GitHub API.

https://docs.github.com/en/rest/reference/repos#create-an-organization-repository

您可以做同样的事情,但更简单的方法是使用 gh 命令行工具。

https://cli.github.com/manual/gh_repo_create

brew install gh
gh auth login
gh repo create flatclass --public