I'm wondering what git branching / release strategies folks are using and would recommend for a project with the following requirements:
We've tried using the Git-flow process (http://nvie.com/posts/a-successful-git-branching-model/) but had two main issues with it:
Are there any other git workflows that would be suitable for this situation or how are others overcoming these issues with Git-flow?
The code we test against at any point during the release branch isn't exactly the same as what will be released (since the release branch needs to get merged with master at the end)
This doesn't make sense. The merge between release branch and master branch should essentially be fast-forward only - your master branch should be dictated by your releases, not the other way around.
Refactoring changes are hard to deal with and will often result in merge conflicts when the release branch merges with master.
See above for your release branches dictating master branch. In addition, you can try rebasing your feature branches as you develop as long as you do not rebase any commits from before the branch split off point.
Before merging your branch into develop, you should rebase the develop branch on top of the feature branch, so that when you merge the feature branch into develop in you get a fast-forwardable merge with no merge conflicts. You should be doing this periodically during development (perhaps once every day to a week depending on the volume of commits in your repository).
If you are refactoring after features have been complete and you are simply refactoring the develop branch then, yes, you should expect merges to be hard.
However, having merge issues when you are merging a release branch into master, or develop into a release branch, is indicative of not following the linked flow correctly.
As far as alternatives,
GitHub Flow
GitHub Flow is a lightweight, branch-based workflow that supports teams and projects where deployments are made regularly.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With