git 在 Github 中向项目所有者添加另一个用户

声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow 原文地址: http://stackoverflow.com/questions/8015579/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me): StackOverFlow

提示:将鼠标放在中文语句上可以显示对应的英文。显示中英文
时间:2020-09-10 12:14:34  来源:igfitidea点击:

Add another user to project owners in Github

gitgithub

提问by Mohsen

How can I add another user to project such that the project shows under his name in his Github account too? I don't want a fork. Two users should host same project in their accounts and this should allow both users to collaborate in the project.

如何将另一个用户添加到项目中,以便该项目也在他的 Github 帐户中以他的名字显示?我不要叉子。两个用户应该在他们的帐户中托管相同的项目,这应该允许两个用户在项目中进行协作。

回答by manojlds

You can only add collaborators to your repository. It cannot be "co-owned".

您只能将协作者添加到您的存储库。它不能是“共同拥有的”。

But when someone is added as collaborator to a repo, that repo will be listed in the Your Repositoriessection ( but the username will be the owner username only)

但是当有人作为合作者添加到仓库时,该仓库将列在该Your Repositories部分(但用户名将仅为所有者用户名)

The only way for doing what you want isto fork the repo and collaborate through pull requests.

做你想做的事情的唯一方法分叉 repo 并通过拉取请求进行协作。

Note that you can create an organization ( https://github.com/account/organizations/new) and achieve a bit of what you want.

请注意,您可以创建一个组织 ( https://github.com/account/organizations/new) 并实现一些您想要的。

回答by jamapag

Go to repository administration, then to Collaborators section and write Github user name in field.

转到存储库管理,然后转到协作者部分并在字段中写入 Github 用户名。

Repositories-> Click on repository you want to add collaborators-> Click on Settings -> on your left, click on 'Collaborators', which is right below 'Options' -> search for the person you want to add -> finally click on 'Add Collaborator'

Repositories->点击你要添加合作者的repository->点击Settings->在你的左边,点击'Collaborators',它就在'Options'的正下方->搜索你要添加的人->最后点击'添加合作者'

回答by Alexander Gladysh

As it has been said, normally you can only add collaborators to your repository. They would be able to push, but they would not be visible as owners.

如前所述,通常您只能将协作者添加到您的存储库中。他们将能够推动,但他们不会作为所有者可见。

If publicity is what you want, create a separate GitHub Organizationfor your project, and add your partner as co-owner.

如果您想要宣传,请为您的项目创建一个单独的 GitHub 组织,并将您的合作伙伴添加为共同所有者。

Here is an example of how it might look like: https://github.com/lua-nucleo/

以下是它的外观示例:https: //github.com/lua-nucleo/

回答by Asher

To add another user to a github.com repository:

将另一个用户添加到 github.com 存储库:

  • Select Settings->Collaboratorsunder the online repository directory.
  • 选择在线仓库目录下的设置->协作者

Here is an example:

下面是一个例子:

enter image description here

在此处输入图片说明