简体   繁体   English

使用Git和gitHub合作项目的流程是否如下所示?

[英]Whether the workflow of using Git and gitHub for cooperating project looks like as follows?

In a simple case, there should be at least three branches created locally.简单情况下,本地至少应该创建三个分支。

  1. First is the local repository for all commits首先是所有提交的本地存储库
  2. Second is a repository that I am working for第二个是我正在为之工作的存储库
  3. Third is used to fetch the remote repository第三个用于获取远程存储库

Here is my assumption about workflow for keeping code integrity and continuous development of the project in the decentralized repository for a group of people (GitHub).这是我关于保持代码完整性和项目在一组人的分散存储库 (GitHub) 中持续开发的工作流的假设。

  1. Jump to branch 3, do the git fetch跳转到分支 3,执行git fetch
  2. Jump to branch 2, do the git merge branch_3 and do integrity validation跳转到分支 2,执行git merge branch_3并进行完整性验证
  3. Jump to branch 1, do the git merge branch_2 and do integrity validation跳转到分支 1,执行git merge branch_2并进行完整性验证
  4. Stay to branch 1, do the git push to upload the local repository to the remote repository.留在分支 1,执行git push将本地存储库上传到远程存储库。 Maybe need to do integrity validation and even worst case, loopback 1-4 if someone pushed their local repository faster than you.可能需要进行完整性验证,甚至在最坏的情况下,如果有人推送本地存储库的速度比您快,则需要回送 1-4。

Check out this article on git branching with develop and master branches.查看这篇关于git 分支的文章,其中包含 develop 和 master 分支。 This is a commonly used approach for defining workflow with developer teams.这是与开发团队一起定义工作流程的常用方法。

在此处输入图像描述

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM