使用GitHub管理多个用户 [英] Managing multiple users with GitHub

查看:128
本文介绍了使用GitHub管理多个用户的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

任何人都可以请教我一件事吗?

我们有一个项目,我们只是决定聘请更多的程序员来处理它。
到目前为止,我是唯一的程序员,在GitHub上备份代码。
但现在我需要找到一个安全的方式来管理多个程序员。

所以有一个私人项目的主分支,其他程序员应该能够克隆。
但他们不应该能够对主分支自己进行更改。
也许他们应该建立自己的分支,并在那里做出改变。
我应该是唯一能够检查他们工作的人,如果它能正常工作,就将它合并到master分支。

任何人都可以告诉我我应该如何设置它?
或者发送一些好的教程?
非常感谢

解决方案

协作编码是Github背后的重点。这里有一个说明性的工作流程,让你开始。类似的开发流程对于开源项目(本质上必须通过互联网工作)是绝对必要的。事实上,很多开源项目都使用Github。你也可以使用这个过程;尽管有一些注意事项,我已经列在底部。



理解这个工作流程的关键是每个开发人员将管理2个存储库:


  1. 个人工作,在他们的本地机器上

  2. 由Github.com托管的所有参与者都可见工作



  3. 安装过程,集成商(项目负责人):


    1. 创建github帐户

    2. 主机项目在那里

    安装过程,开发人员:


    1. 创建github账户

    2. 分销项目

    3. git clone forked branch to本地计算机

    开发过程,开发人员:


    1. 在本地副本上工作

    2. 推送到github副本。 (请记住,每个开发人员都有自己的 Github分支。)

    3. 向项目负责人的Github存储库提交pull请求。

    4. 冲洗并重复。

    开发过程中,集成商:


    1. 在Github上查找请求

    2. 查看它们,批准它们并合并它们

    3. 如上所述, sans the pull requests

    然而,这不是唯一可能的工作流程。例如,Github使开发人员可以方便地向彼此发送拉取请求,例如,如果他们中的两个在一个功能上一起工作。这样,所有人都可以在集成者角色中工作。



    注意事项:
    如果您的程序不是打开 来源,那么使用github有一个警告:您必须支付托管私人存储库的费用。然而,他们有一个机制(免责声明:从未使用过)来组织集合的人在公共或私人存储库上工作,我相信这些成本可以完全由组织所有者支付。这对你的开发人员来说很好,并且为你付出了一些额外的费用。



    如果你只有几个贡献者,你可以通过免费私人通过使用 Bitbucket 而不是Github。他们可以免费托管私人回购协议,工作流程与我上面概述的大致相同。


    Can anyone please consult me on one thing?

    We have a project, and we just decided to hire more programmers to work on it. Up to now I was the only programmer, backing up the code on GitHub. But now I need to find a safe way how to manage multiple programmers.

    So there is a master branch of private project, which other programmers should be able to clone. But they should not be able to commit changes to master branch themselves. Perhaps they should make their own branches, and commit changes there. And I should be the only person who is able to review their work, and merge it to master branch if it works right.

    Can anyone please tell me how exactly I should set it up? Or send some good tutorials? Thanks so much

    解决方案

    Collaborative coding is rather the whole point behind Github. Here's an illustrative workflow to get you started. A similar development flow is absolutely essential to open source projects (which by nature must work via the internet). In fact, a lot of open source projects use Github. You can use this process, too; although there are some caveats, which I've listed at the bottom.

    The key to understanding this workflow is that each developer will manage 2 repositories:

    1. Personal work, on their local machine
    2. Work visible to all participants, hosted by Github.com

    Setup process, integrator (project lead):

    1. Create github account
    2. Host project there

    Setup process, developer:

    1. Create github account
    2. Fork the project
    3. git clone forked branch to local machine

    Development process, developer:

    1. Work on local copy
    2. Push to github copy. (Remember, each developer has their own Github branch.)
    3. Submit a pull request to the project lead's Github repository.
    4. Rinse and repeat.

    Development process, integrator:

    1. Look on Github for pull requests
    2. Review them, approve them, merge them
    3. Work on local copy, as above, sans the pull requests

    However, this isn't the only possible workflow. For example, Github makes it convenient for your developers to send pull requests to each other, e.g. if two of them are working together on a feature. This way, all of them may work in the "integrator" role somewhat.

    Caveats: If your program is not open source, then there is one caveat to using github: you must pay to host private repositories. They have a mechanism (disclaimer: never used) for organizing collections of people to work on either public or private repositories, however, and I believe the cost can be paid entirely in the organization owner — which would be great for your developers, and cost some extra for you.

    If you only have a few contributers, you might be able to get by with having a free private repository by using Bitbucket instead of Github. They have an option to host private repos for free, and the workflow would be about the same as what I've outlined above.

    这篇关于使用GitHub管理多个用户的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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