Introducing branch-based deployment

When we launched our Managed Hosting service back in 2010, we quickly found that using Git for application deployment was a bit of a challenge for our customers. At that time, distributed version control systems just weren’t widely used yet and many people had no experience with Git whatsoever when they started hosting on freistilbox. So we did our best to keep Git usage as simple as possible.

This is the reason that up until now our deployment system only used the “master” branch of the website instance repository. While you could use any branch in your local development repository to work on your web application, finally the code had to be pushed to the “master” branch on the hosting platform side. If you use multiple website instances for staging and testing you’d push to multiple remote repositories but it would always be to their “master” branches.

Over time, our customers got more proficient with Git and started to adopt multi-branch development approaches such as “Git Flow”. With their Git skills growing, more and more customers started asking for a more symmetrical deployment concept. They’d expect that their “master” branch would go to the production website’s “master” branch, “staging” should go to the staging website’s “staging” branch and so on.

We’re happy to report that finally, multi-branch deployment is here. From now on, you can choose the branch from which each website instance will deploy code.

At the moment, you’ll still have to push to a separate repository for each website instance. But don’t worry, deployment to different website instances from a single central repository will come eventually, so please bear with us.

Until then, you can set up your working repository like this to make things as easy as possible:

git config remote.production.url <production repo URL>
git config branch.master.remote production
git config remote.staging.url <staging repo URL>
git config branch.staging.remote staging

With these settings, a simple git push from the “master” branch will upload your changes to the production instance and a push from “staging” will automatically go to the staging instance.

Are you already excited to test the new branch deployment? Simply send us a support request and let us know the site ID of your website and which branch you’d like us to assign to it.

We hope that this change will make your daily development work a little bit easier. Drop us a quick tweet to @freistilbox to let us know if it does!