Add extra branch to Git Flow merges

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

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.

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.

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.

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?

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

Suggest an answer

Log in or Join to answer
Community showcase
Brian Ganninger
Published Jan 23, 2018 in Sourcetree

Tip from the team: workflow and keyboard shortcuts

Supported Platforms macOS Sourcetree has a lot to offer and, like many developer tools, finding and using it all can be a challenge, especially for a new user. Everyone might not love ...

273 views 0 3
Read article

Atlassian User Groups

Connect with like-minded Atlassian users at free events near you!

Find a group

Connect with like-minded Atlassian users at free events near you!

Find my local user group

Unfortunately there are no AUG chapters near you at the moment.

Start an AUG

You're one step closer to meeting fellow Atlassian users at your local meet up. Learn more about AUGs

Groups near you
Atlassian Team Tour

Join us on the Team Tour

We're bringing product updates and pro tips on teamwork to ten cities around the world.

Save your spot