Branch Management in Trendyol Android Team

Burcu Guler
Trendyol Tech
Published in
4 min readApr 17, 2020
https://unsplash.com/photos/H7LxvEmVZnE

In Trendyol, we care adopting smooth and fast running processes during our product development. As you all know handling problems easily during development is as important as having a stable and maintainable product and that is why these processes are quite important for us. In our previous posts, we have already given general information about how our development cycle is managed from beginning to end. If you want to know more about this lifecycle please take a look at our first post below.

As we mentioned earlier, we use Gitflow as workflow to have necessary flexibility in branch management. In this blog post, I mainly focus on how this mechanism works in our team, what kind of branches we have and purposes of these branches, how these branches are used through our development cycle in detail. I will also try to visualize relations between branches by using flow diagrams.

If you don’t know Gitflow or you want to refresh your knowledge about it, you can find detailed information from official page.

We have two main branches named as “master” and “develop”.

  • Master contains the codebase of latest application in PlayStore.
  • Develop contains the most up to date codebase of the application.
Master-develop relation

Addition to these two branches, we also have “Feature”, “RC” and “DEV_PROCESS” branches.

  • Feature branches are created from develop. These branches are used to develop small size tasks and bugs in the sprints. If any issue is found during the tests, these are fixed in related feature branches. After completing the tests, feature branches are merged into develop by QA engineers in the team.
Master-develop-feature branches relation
  • DEV_PROCESS are used for large scaled features which need more time than one sprint. Since these features are usually divided into multiple small tasks, feature branches are created from DEV_PROCESS for these tasks. Responsible developers work on related feature branches and these are merged into DEV_PROCESS after the completion of the related task. When feature development is finished, QA engineers start to test it and when everything works as expected DEV_PROCESS is merged into develop by QA approval.
Master-develop-feature-dev_process relation
  • RC(Release Candidate) branches contains the codebase which is ready to release as it can be understood from its name. These branches are created from develop as soon as the codebase is ready to start regression test. While creating these branches we take advantage of our automation tool. It creates RC branches by our demand and notify us about the branch status. Found bugs are fixed on feature branches which are created from current RC branch. In the end, these feature branches are also merged into RC by QA approval.

Once regression test is done, we release approved version by using staged rollout. In this stage, if there is any problem needs to be handled we create a new RC branch from the previous RC branch, and we start our bug fixing and regression procedures all over again. After incrementing our user percentage step by step, when we release the application to %100 of users, we tag the code with new version like 4.3.0 and merge latest RC branch into master. And in the end we merge RC branch into develop branch. You can find the final branch diagram below.

Relation of all branches

This blog post is focused on how we as Trendyol Android team interpret and use Gitflow in our development process. You can also check our guideline repository below for more information our development guideline.

Thanks for reading so far and I hope you find it useful. Feel free to leave a comment if you have any questions/suggestions!

--

--