Question

I've got a master branch which represents what's there on production server. I've a dev branch (child of master) which contains work done in the sprint just finished. master branch also contains fixes done on production server after getting diverged from dev.

Now I need to merge both of them and create a new branch called UAT where it will be tested for production readiness.

So should I?

merge master > dev
branch uat from dev
merge uat > master (once uat is stable)

or

branch uat from master
merge dev > uat
merge uat > master (once uat is stable)

In both cases, developers will carry on working on dev branch.

Was it helpful?

Solution

In git, there is no "one way" of managing the code workflow, and you should use what suites your inner workflow best.

On atlassian web, there are several workflow types compared. In the section "Hotfix branches" of page "Gitflow workflow" (that seems to be best for you) is shown, that you should merge the hotfixes right away into master and develop branches. It is based on workflow defined by Vincent Driessen at nvie

Gitflow workflow

Then it is obvious the release (or in your case UAT) branch should come from develop branch

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top