We don’t allow questions seeking recommendations for software libraries, tutorials, tools, books, or other off-site resources. You can edit the question so it can be answered with facts and citations.
Closed 2 years ago.
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
接受
或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
发布评论
评论(1)
gh 版本将涉及通过 API 获取默认分支。
这样,您的远程存储库可以默认使用 master 或 main 或任何其他分支,您可以在本地切换到正确的分支
如果您不想依赖远程 GitHub API,您至少可以阅读 本地存储库默认分支:
The gh version would involve getting the default branch through API.
That way, your remote repository could use master or main or any other branch as default, you would switch to the right one locally
If you do not want to depend on a remote GitHub API, you can at least read the local repository default branch: