当前位置:   article > 正文

github合作_在github上合作

you now have push access to

github合作

In the last tutorial, we learned about the basics of GitHub. In this tutorial, all those basics will come together and we will get to experience the real power of GitHub which comes from collaboration. Please note, in this tutorial, we will be frequently using words like cloning, push, pull, branches, master, etc. Therefore, if you are not clear on any of these, please read through the last tutorial first.

在上一教程中 ,我们了解了GitHub的基础知识。 在本教程中,所有这些基础知识都将融合在一起,我们将体验到协作带来的GitHub的真正功能。 请注意,在本教程中,我们将经常使用诸如克隆,推,拉,分支,主等之类的词。因此,如果您不清楚其中任何一个,请首先通读上一教程

定义协作 (Defining Collaboration)

To appreciate the solution, it is important to appreciate the problem. Read through the following to understand the scenario where GitHub can come in handy.

要了解解决方案,重要的是要了解问题。 通读以下内容以了解GitHub派上用场的场景。

You are a lead data scientist who is working on a machine learning project with a team of junior data scientists. Since you are the project owner you are responsible for maintaining the “master” version of the project code.

您是首席数据科学家,他正在与一组初级数据科学家一起从事机器学习项目。 由于您是项目所有者,因此您有责任维护项目代码的“ 主版本”

In your team, every data scientist is working individually to improve the model prediction. Therefore, they have created their local versions or alternate branches of the “master” version.

在您的团队中,每个数据科学家都在单独工作以改善模型预测。 因此,他们已经创建了本地版本或“主”版本的备用分支

Let’s assume that you have made some edits to the “master” version of your code and a member of your team comes up with his own edited version and claims that he has considerably improved the model prediction. A visual of this scenario is as follows:

假设您已经对代码的“ ”版本进行了一些编辑 ,并且您的团队中的一个成员提出了自己的编辑版本,并声称他已经大大改善了模型预测。 这种情况的外观如下:

Image for post
Sample Scenario (Image by Author)
示例场景(作者提供的图片)

You now want to update the “master” version of the code but a number of conflicts can arise. Mentioning a few below:

现在,您想更新代码的“ ”版本,但是可能会发生许多冲突。 下面提到一些:

  • The edits you have made to the “master” version are probably not there in your team member’s branched version

    您对“ 主”版本所做的编辑可能不在您团队成员的分支版本中

  • The branched version might have some variable treatments which are different when compared with the “master” code

    与“ 主”代码相比,分支版本可能会有一些不同的处理方式

This means simply overwriting the “master” code with the branch version of the code might not be in the best interest of the project. To resolve conflicts like these, GitHub comes in handy

这意味着仅用代码的分支版本覆盖主”代码可能不符合项目的最大利益 。 为了解决此类冲突 ,GitHub派上了用场

解决时间 (Solution Time)

I am sure that the above scenario must have made you appreciate the problem at hand. The question is, how GitHub will help?

我确信上述情况一定会让您意识到手头的问题。 问题是,GitHub将如何提供帮助?

第一件事第一 (First Things First)

Before we jump onto the solutions, let’s understand some basic terminologies we will be using throughout this tutorial:

在进入解决方案之前,让我们了解在本教程中将使用的一些基本术语:

  • Collaborator — A developer who is formally added to the project repository and is given the push access (access to modify the content of the repository) is called as a contributor or collaborator

    协作者正式添加到项目存储库并获得推送访问权限 (访问修改存储库内容的权限)的开发人员称为贡献者或协作者

  • Fork — Forking in GitHub is like copying someone else’s repository into your account. Generally, when you want to use an open-source project created by some other developer and you are not a contributor, you fork it and get access to their repository.

声明:本文内容由网友自发贡献,不代表【wpsshop博客】立场,版权归原作者所有,本站不承担相应法律责任。如您发现有侵权的内容,请联系我们。转载请注明出处:https://www.wpsshop.cn/w/繁依Fanyi0/article/detail/733390
推荐阅读
相关标签
  

闽ICP备14008679号