1

We have more than 7 git repositories. Each repo contains 10 dot net applications/solutions they are completely independent of each other.

We are following Feature -> DEV -> Master branching approach.

Here, we merge the Feature branch to DEV it is working fine. When we merge our DEV and master branch at that time there are commits on Dev for other solutions which should not go to master since the feature is not yet released to production.

Right now we are copying one solution(which went to production) locally and creating a branch from master pasting solution to this branch and creating PR to master.

Is there an efficient way to handle this?

Can we create separate git repo for each solution so it will be easy to merge in the above case?

Please suggest the best approach to handle the above case.

Thanks in Advance.

sujayadkar
  • 63
  • 1
  • 13

1 Answers1

1

When we merge our DEV and master branch at that time there are commits on Dev for other solutions which should not go to master since the feature is not yet released to production.

That is why, ideally, you would be merging Feature to master, not DEV.

That is what gitworkflow (one word) is about:

gitworflow

The idea is: avoid the tension of Git Flow (feature->dev->master) described here:

in GitFlow there is always an unsolvable tension between the desire to keep development work clean and isolated on a topic branch, and integrating topic branches with other work by merging them to develop to make them visible and testable and to check for conflicts.

If you merge multiple feature in Dev and merge it to master, you merge everything, including features which are not ready.

If you merge directly features to master, you are merging only the ones deemed ready in Dev, which becomes an ephemeral branch, reset at each new development iteration.

torek
  • 448,244
  • 59
  • 642
  • 775
VonC
  • 1,262,500
  • 529
  • 4,410
  • 5,250
  • Note to self: That was my **26000th answer** on Stack Overflow (in 154 months), a bit more than 6 months after the [25000th answer](https://stackoverflow.com/a/65370954/6309). Before that: [24000th answer](https://stackoverflow.com/a/62688871/6309), [23000th answer](https://stackoverflow.com/a/59853332/63099), [22000th answer](https://stackoverflow.com/a/57387243/6309), [21000th answer](https://stackoverflow.com/a/54856158/6309), [20000th answer](https://stackoverflow.com/a/51915541/6309), [19000th answer](https://stackoverflow.com/a/49421565/6309), ... – VonC Jul 03 '21 at 20:43
  • Hi @vonc, Thanks for your answer and sorry for the late reply. We were discussing this approach in my team and we stuck at Pull Request. Where should we include Pull Request(Code Review) flow here? – sujayadkar Jul 23 '21 at 14:04
  • @sujayadkar Whenever you merge a feature request to dev or main, you would make a pull request. – VonC Jul 23 '21 at 14:13