在GitHub上设置私人回购有什么好处? [英] Are there any advantages to forking private repo on GitHub?

查看:161
本文介绍了在GitHub上设置私人回购有什么好处?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我是在一家小公司从事私人GitHub回购的少数开发人员之一。回购是我们的老板在他的GitHub账户下创建的,所有开发人员都可以访问它。



您可能知道,可以将主要回购和即使您没有付费订阅,叉仍然保持私密。所有添加到原始回购库中的人都会自动添加到分支的观察者列表中(我不知道为什么)。



这是我前一阵子做的好奇心(我不知道我可以做到这一点),因为我认为这将是很好的,让我在工作中的分支机构和暂时的主要回购之外的东西保持清洁。但是今天我的老板问我为什么要这么做,除了我上面提到的,我无法提出一个好的理由。

有没有什么好的理由让叉子在GitHub上的私人回购,而不是直接推到主回购?

解决方案

需要分出老板仓库的一个原因是如果他不允许你直接向这个资料库作出贡献的话。但是,由于他允许您直接访问,因此没有明确的需要制作分支。正如@Diego指出的那样,GitHub喜欢让用户从自己的回购站点中推拉,然后通过拉取请求将更改提交到上游回购站。但是,分叉不需要审查更改。一个简单的方法是在老板的远程仓库中创建功能分支,并让他查看这些更改。


I'm one of a few developers working on a private GitHub repo in a small company. The repo was created by our boss under his GitHub account, and all the developers have push access to it.

As you may know, it's possible fork the main repo and the fork will sill remain private even if you don't have paid subscription. And everyone who's added to the original repo will be added to the fork's watchers list automatically (I have no idea why).

This is what I did a while ago out of curiosity (I didn't know I could do this) and because I thought it would be nice to keep my work-in-progress branches and temporary stuff outside of the main repo to keep things clean. But today my boss asked me why I did this, and I couldn't come up with a good reason except what I said above.

Are there any good reasons to fork a private repo on GitHub instead of pushing to the main repo directly?

解决方案

One reason for needing to fork your boss' repository would be if he did not allow you to directly make contributions to this repository. However, since he is allowing you direct access, there is no explicit need to make a fork. As @Diego pointed out, GitHub likes to have users push and pull from their own repo, and then submit changes to the upstream repo via a pull request. However, forking is not necessary to review changes. An easy alternative would be to just create feature branches in your boss' remote repository and let him review those changes.

这篇关于在GitHub上设置私人回购有什么好处?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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