如何在 GitHub.com 中设置默认分支? [英] How to set the default branch in GitHub.com?

查看:48
本文介绍了如何在 GitHub.com 中设置默认分支?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我找到了以下信息,但没有找到去哪里访问它.账号设置里没找到.有回购设置页面吗?您必须是回购所有者吗?

I found the following info, but didn't find where to go to access it. Didn't find it in account settings. Is there a repo settings page? Do you have to be the repo owner?

https://github.com/blog/421-pick-your-默认分支

当我去浏览提交时如何在 github.com 上设置默认分支.

How to set the default branch on github.com when I go to browse commits.

推荐答案

您必须是回购所有者吗?

Do you have to be the repo owner?

是的.

当我去浏览提交时如何在 github.com 上设置默认分支.

How to set the default branch on github.com when I go to browse commits.

如果您分叉存储库,您可以通过点击设置按钮(见下文)更改您的分叉的默认分支.

If you fork the repository, you can change the default branch of your fork, by clicking on the Settings button (see below).

这将允许您选择自己喜欢的分支作为您自己的分支的默认分支,但您必须自己保持分支存储库与上游存储库同步.

This will allow you to pick your favorite branch as the default one for your own fork, but you'll have to keep your forked repository in sync with the upstream repository by yourself.

或者你可以直接跳转到如下网址https://github.com/{:user}/{:repo}/settings

Or you can directly jump to the following url https://github.com/{:user}/{:repo}/settings

这篇关于如何在 GitHub.com 中设置默认分支?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆