关于分支,发布等组织方式,求大家推荐,谢谢~~
能和github结合起来讲就最好啦,因为想采用github作为代码仓库
说一下我自己的思路吧
开始的时候,创建一个主仓库,假设叫master_github,里面建立两个分支,master和develop分支,master分支用来发布,develop分支用来开发
一个新成员加入的时候,首先要fork主仓库master_github,假设fork之后的仓库叫做member_github,新成员把member_github的代码clone到本地,然后checkout develop分支下进行开发
当member_github的develop分支开发的功能完成,并且通过测试之后,先提交到本地的仓库,然后通过push到member_github仓库,然后再向master_github发pull request
master_github管理员决定是否合并来自member_github的pull request
当develop分支merge来自各个member_github的功能达到一个发布时,把develop分支rebase到master分支,进行发布
以上是我的思路,请大家帮忙看看是否规范,有没有哪里有问题的,不知道master_github中的一个develop分支是否够用?
还有个问题就是发布版的bug修复应该怎么弄呢,在master_github中再创建分支吗?等bug修复玩再合并到develop和master里面吗?
PHPz2017-04-24 09:14:25
If you have a small team and work together, using github pull is a bit expensive,
You can definitely use one of the following methods:
In this way, you can also use other functions such as github issues.
阿神2017-04-24 09:14:25
I will answer it myself
git flow
The above is a relatively classic git flow
Still looking for information about forking workflow
大家讲道理2017-04-24 09:14:25
Let’s talk about how we currently use git branches
The overall project is divided into two branches: master and develop. Master is mainly used to publish websites. develop is mainly used for separate use.
When everyone develops, they clone it from develop and create a developer's own branch, such as zhang. (When there are new joiners, use the same method to rename the branch li.). When the development work is completed, submit the local warehouse and git push your own branch. Finally, merge develop into your own branch (it may have been modified by the developer during development) to ensure that the merge is successful. After the merge is correct, merge the currently merged zhang branch into the develop branch. (Note: The merge operation here is first merged into the local branch. Then merged into the remote branch. It is a bit more than one step).
After the last day of work, develop will be merged into the master branch and run online through master.
In addition, when there are urgent bugs that need to be corrected in the online environment. Then create a branch from master. Independent maintenance. After that, synchronize the master and develop branches respectively.