Try our conversational search powered by Generative AI!

Darren Stahlhut
Apr 1, 2019
  2023
(3 votes)

GitFlow is a natural fit for Episerver DXC

In this blog, I'll explain a little about GitFlow and why it aligns so well with Episerver DXC development.

What is GitFlow?

If you're not familiar with GitFlow, it's just another branching and merging strategy. It was made popular by Vincent Driessen at nvie and has since been widely adopted by the development community.

It's also built into the most popular Git Clients including SourceTree and GitKraken and is available via commands in Git console.

What I like most about GitFlow, is not the merging strategy itself, but its things that having a standard strategy offers;

  • We can more easily collaborate with external developers and Agencies. We can simply by say "we use GitFlow" and they'll know what we mean.
  • Onboarding Developers is faster, there are a lot of good learning resources around.

GitFlow merging strategy (in a nutshell)

There are two main branches in GitFlow;

  • master - the code you have or are going to release.
  • develop branch - the latest development, changes for the next release.

Besides the main branches, we also have;

  • feature branches - this is where you actually do your development and commits.
  • release branches - a branch to get code ready to release to master.
  • hotfixes - for emergency fixes for master branch to be immediately released.

GitFlow merging diagram

Why does this work well with Episerver DXC?

Because of Episerver DXC's linear deployment path, code must be deployed from Integration > Preproduction > Production.

This means we can think of our Master branch as the code ready to be deployed to Integration.

Deployments above Integration are managed via the Paas Portal or via Episerver Support.

If you also want to have an internal CI/CR (build and release) environment for internal QA, you can run it off the Develop branch

This all means we can use the standard implementation of GitFlow.

Wrapping it up

I'm not saying GitFlow is perfect, but it is a decent merging strategy. It can become complicated when you aren't certain about the order that Features will be released and I have some very large scale projects that GitFlow struggles to handle so we have a customized strategy.

But generally speaking, for Episerver DXC projects where the deployment chain is linear, I've found it's a great fit.

This might change in the future if we are allowed to use our own DevOps tools to deploy directly to Preproduction (or even Production) which is something I've heard is on the technical roadmap. 

Resources

Apr 01, 2019

Comments

Marcus B
Marcus B Apr 1, 2019 02:42 AM

We will be enabling more options for devops in the DXC Service this year too, so hopefully it will meet everyone's preferences (i.e. not just GitFlow) in the future too :-)

KennyG
KennyG Apr 1, 2019 01:32 PM

I'd really like to be able to grab a bacpac of the Prod database from the Paas portal. Good to hear there are some enhancements on the horizon.

Apr 2, 2019 08:44 AM

We've been using GitFlow for quite a few years and it's good in a lot of situations. To note there's a great VS 2017 extension as well https://marketplace.visualstudio.com/items?itemName=vs-publisher-57624.GitFlowforVisualStudio2017 if you don't want to leave the VS workflow.

We do have problems as a digital agency running multiple projects and support work in parallel. Therefore we double branch, e.g. we have a feature branch for project and then sub-features for work items. This allows us to make sure develop/master are only updated when projects are complex. When then create release branches off our project branch. This in our expereince has allowed reduction in overlap or issues and the ability to deploy out branches in a more parallel structure.

When the DXC get's hotflix deployment support to be able to deploy direct thing like this will be even more important.

Apr 2, 2019 10:37 AM

@scott awesome, sounds like we are basically running our strategy the same way.

We do most of our commits on feature/sub-feature branches, then submit PRs from sub-feature to our  feature branch. When its time to release the feature, we create our release branch. 

We internally host an Episerver instance as the CI/CD target for the develop branch. Sometimes we use this to test release branches prior to merging to develop. I've often thought of scripting up infrastructure as a service to test our release branches.

Please login to comment.
Latest blogs
The A/A Test: What You Need to Know

Sure, we all know what an A/B test can do. But what is an A/A test? How is it different? With an A/B test, we know that we can take a webpage (our...

Lindsey Rogers | Apr 15, 2024

.Net Core Timezone ID's Windows vs Linux

Hey all, First post here and I would like to talk about Timezone ID's and How Windows and Linux systems use different IDs. We currently run a .NET...

sheider | Apr 15, 2024

What's new in Language Manager 5.3.0

In Language Manager (LM) version 5.2.0, we added an option in appsettings.json called TranslateOrCopyContentAreaChildrenBlockForTypes . It does...

Quoc Anh Nguyen | Apr 15, 2024

Optimizely Search & Navigation: Boosting in Unified Search

In the Optimizely Search & Navigation admin view, administrators can set a certain weight of different properties (title, content, summary, or...

Tung Tran | Apr 15, 2024

Optimizely CMS – Getting all content of a specific property with a simple SQL script

When you need to retrieve all content of a specific property from a Page/Block type, normally you will use the IContentLoader or IContentRepository...

Tung Tran | Apr 15, 2024

Join the Content Recommendations Work Smarter webinar May 8th 16.00-16.45 CET with expert Aidan Swain

Learn more about Content Recommendations, with Optimizely’s very own Senior Solutions consultant, Aidan Swain . He will discuss best practices and...

Karen McDougall | Apr 12, 2024