1

我正在开发一个团队规模为 9 人的项目,我的所有代码都在我的 GitHub 帐户上作为公共存储库。我拥有主分支,我的团队成员已经分叉了它,他们在项目上工作并为他们所做的更改提出拉取请求。

它是一个 Java 项目,我们将 Eclipse (Juno) 与 Egit 一起使用。到目前为止,所有成员都了解工作流程,即

  • 代码。
  • 提交更改。
  • 推送到上游(从项目>团队)
  • 在 GitHub 上提出拉取请求。
  • 请求的更改被合并到主分支(由我)。
  • 成员从 shell 执行,然后git fetch upstream从Eclipse 执行(Project>Team 菜单)。git merge upstream/masterPush to Upstream

另请注意,成员已经将他们的分叉与主分支同步使用git remote add upstream https://github.com/me/MyProject.git

最后,当我遇到拉取请求时,我只是从 GitHub.com 确认合并,然后Pull从 Eclipse 确认。

目前一切正常,但现在整个项目将被转移到私人仓库(每个成员将在他们自己的私人仓库中拥有自己的项目分支)。我知道如果我将我的仓库设为私有,那么我将失去所有分叉它的成员。

那么我怎样才能将我们所有的仓库设为私有并以上述方式继续工作呢?

笔记:

这是我的第一个 GitHub 合作项目,所以我对整个分叉和分支概念不熟悉,我的团队成员也是如此。

4

1 回答 1

2

You don't want to have a private repo per team member. Instead you want to create an organization on github, put all team members into the organization and then have a private repository for the organization, which is accessible to all members. The team members can either work directly on that organization repository or create forks for personal development.

It is also possible to have a workflow with everyone using a personal private repository, but that would be really cumbersome, as every member of your project would have to add all other repositories as remote locations in his repository. And the management of the access rights of so many repositories would be a nightmare.

于 2012-10-06T07:57:59.397 回答