-1

We have a situation regarding branches and versioning. e.g. We have a master branch with 2.0 version, now what it gets complicated is we have three teams working on the same project but in different sprints ending in different dates. Example Sprint 1 - ends within a week, Sprint 2 ends within 2 weeks and also sprint 3 - ends within 2 weeks. What is the best Git Flow to use when it comes to branching from development and merging back into it. e.g. Team 1 - (Sprint 1) will complete its work in 1 week and wants to test it's work right after it. If we merge it back into development branch and then merge it to release branch for testing purposes then you will have the code of others too that have pushed their branches into development branch and that also will continue to work until the end of the sprint. Any experience before with almost the same situation that can help? Thanks in advance,

enter image description here

Thyreme
  • 17
  • 6
  • 3
    Can you add a graphical chart of the branches, it will be easier to read/understand. Remember the other branches can always merge development code into them if they need to. This way they will stay "fresh" if they need to. – Raf A. Nov 14 '17 at 13:32
  • Hi Raf, sorry for late response but these couple days we've been overloaded. Please find attached the git flow that we're trying to apply currently, but we're trying to integrate new one to adapt the new development process. Thanks in advance, – Thyreme Nov 17 '17 at 12:12

1 Answers1

-1

Thank you for the chart.

I believe the big mistake you are making, is using the release branch for bugfixing. The release branch should not be used for bugfixing but just releases (as I understand git flow). The develop branch (and feature branches) should be used for bug-fixing.

The "normal" git flow process/flow is sufficient to meet your needs. If you don't want a feature to be part of a release, do not put it in the develop branch, but keep it in the feature branch.

You can have 3 feature branches at the same time, no problem.

Does one feature branch need to be up-to-date with develop? No problem, git checkout feature-branch and then git merge develop. This way feature branch and develop branch are "holding hands".

Is feature branch 2 ready for release, no problem, you make a git flow finish on that branch, and then make a release.

Then feature branch 3 can "merge develop" if that's the need, to stay fresh.

Raf A.
  • 124
  • 1
  • 4
  • 9
  • Raf. Thank you for your reply, but what's confusing me is that if sprint for feat.1 has been closed and we want to release it for testing purposes, but in the meantime feat.2 is still being developed and it's sprint closes i.e. a week after, and also feat.3 sprint closes a week after or two then how we should proceed? – Thyreme Nov 23 '17 at 13:18
  • Additionally how do we treat bugs, can you please give me an example of where do they properly have to be branched off, i.e. we have master branch that is 1.48 and development 1.49 that is being worked on, so when a bug comes up by testers they say Affect version is 1.48 right? so that Bug branch do they have to branch it from dev. branch or master and also after it has been fixed what version does it get and to which branches it returns back by merging. I know it's too much and pls forgive me but we have a situation where none of the git flows isn't being adapted right now. Thanks in advance – Thyreme Nov 23 '17 at 13:23
  • Hey there. Here is the "git flow" way: If you closed your feat. 1, then feat. 1's changes should be in Develop branch. So if you want to test feat 1, you must actually test the develop branch. "git checkout develop" - if you want to test feat 2. you must checkout the feature 2 branch "git checkout feature/feat2" (or whatever you call it) and the same with feat. 3. Because feat 2 and 3 are still in development. If you need feat 1. INSIDE let's say feat. 3, then in feat. 3 branch you need to "git merge develop". – Raf A. Nov 27 '17 at 19:56
  • About bugs: if it's a serious bug, you make a hotfix for 1.48 master. if it's not serious, you do it in develop 1.49 and when you are ready for a release, you make a release branch. Remember HOTFIX branch will FIX BOTH master and develop branch. – Raf A. Nov 27 '17 at 20:01
  • Thank you Raf we'll try to adjust our flow and see what comes out. Thank you for your time. – Thyreme Nov 29 '17 at 14:04
  • Release branch should be used for bug fixing – mcatach Dec 19 '17 at 20:33