How to branch for each task strategy with git

My team is currently looking for a flexible git forking strategy. Initially, I thought we could follow this article: http://nvie.com/posts/a-successful-git-branching-model/ , but, unfortunately, we push production too often to work on a multi-branch tasks in it until it becomes stable (next release branching strategy). In addition, situations often arise where problems that only have to take several days to complete, take time to resolve due to a change in priorities. Since we don’t have time to work on these long-term tasks, they sit in the dev or the next release branch and give way to the possibility of hacking products.

I want to adopt a strategy for each task and want to know how this was done with git before. I am talking not only about function branches, but also a branch for each individual task that you have assigned. In addition, there will not be a dev branch, since the branches of your task will be your dev branch. The presence of a development branch encourages developers to directly attach to this branch, which leads to open problems in our main branch.

I came up with this: http://imgh.us/ProtectedMasterBranch.jpg

I believe that adopting this strategy will keep the main industry clean, and will also be taken into account when developers do not need to complete their tasks before we push production.

The main idea is that the main branch is a protected branch, and there is no development branch. Since the main branch is protected, it will force you to create a branch from it for individual tasks. To merge again, you must request a merge with the administrator. We mark all releases for production, and corrections will also be separated from the main branch. We have four test sites that we can use to test different branches of tasks.

I have not seen examples of this strategy yet, so I was hoping to get some feedback on what I have here.

UPDATE

So, I know that some time has passed since this question was posted, but if someone is looking for a similar strategy, it seems that GitHub has adopted it here .

Thanks in advance.

+4
2

git, , :). , develop, develop. , , develop (.. master tag), .

-- git, . , git flow feature start PR-123_make-widget , PR-123 JIRA.

git -flow, , (, , , , develop. , master, develop.

" " ( Github, Stash, Bitbucket ..), , Gerrit.

, , , , , . !

, , . , ? ? "" "", , , , . .

, , master . , , , , . , , , - , , , . develop/master , , ( , ​​..) , , release.

, , , .

, , :).

+5

, git

Git , .

. , , , ( , , , ). , , , git , , , , , featureX, featureY .. , .

, , , - git, !

, - , , QA . , , , , - . git , , ..

, , QA . ? ( , -, , , CI- ..). , , 8 , . .

+1
source

Source: https://habr.com/ru/post/1529422/


All Articles