Create
cancel
Showing results for 
Search instead for 
Did you mean: 
Sign up Log in

Add extra branch to Git Flow merges

Bert Oost November 3, 2014

We have a setupped branches like

  • master -> Production site
  • develop -> Development stable
  • test -> Test site

Also using Git Flow for our project(s). Which really is great to have.

The thing is; when you finish a feature/hotfix, it's being merged to develop and master, which is great. Only I am wondering if it's also possible to include our test branch here too?

Can I just add "test = test" to the git config or is this not going to work either?

Thanks in advance.

1 answer

0 votes
Seth
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
November 4, 2014

If you are using gitflow, you should have 3 prefixes to work with: feature, hotfix, and release.

Feature should only merge to develop. Hotfix and Release should merge into both master and develop.

The point of "release" prefixed branches is to test. Instead of having a pre-defined permanent branch to deploy to your test site, I'd recommend deploying the current release/* branch to the test site. When there are failures, commit the fixes to the release/* branch. When the release is successfully validated, you finish it and it merges to develop and master.

Bert Oost November 4, 2014

Okay. We're working with Git Flow. We use the prefixes and we have a 'master', 'develop' and 'test' branch. 

So; you're saying that a feature should be merged into 'test' manually (to test it) and when it's working, we should use Git Flows 'finish', which merges it into 'develop' and 'master'. And we should merge Hotfixes and Releases to test manually (to keep test up to date?)

Thanks for sharing your opinion.

Seth
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
November 4, 2014

You could do it that way, it would certainly work. However, my recommendation is to get rid of the permanent "test" branch, and INSTEAD deploy the current release or hotfix branch directly to your test site.

Bert Oost November 4, 2014

So you say; just make a clone on the "test" environment and just switch to the right branch instead of merging into a 'test' branch.. And only finish a hotfix or new feature when it's working on that?

Seth
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
November 5, 2014

That is the design philosophy of git flow: http://nvie.com/posts/a-successful-git-branching-model/

Bert Oost November 5, 2014

Make sense (of course hehe).. Realy thanks for your opinion and time here. Appreciate it!

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events