KINTO Tech Blog
Workflow

From Git-flow to GitHub-flow

R Wen
R Wen
Cover Image for From Git-flow to GitHub-flow

Hello! 👋

This is Ruoyang Wen from Global Group, KINTO Technologies. I work as a full-stack engineer in Global KINTO App team. You can read more about the Global group here.

Objective

As a startup company, there are a lot compromises within our first generation product. For the greater benefits, apart from the service we provide, workflow is also where we need to improve.

This article shares why and how we changed our workflow from Git-flow to GitHub-flow.

Attempt

As part of the Toyota group companies, we implement the principle of improvement (or kaizen in Japanese) in our daily work. With customer feedback and analytical data, there are numerous amount of improvements that we can do to better serve our customers. Through automation, the process of kaizen can be sped up rapidly.

Committing source code is a daily job for engineers, it’s not just about handing over our daily work but also testing the code in our server environment. We introduced Continuous Integration and Continuous Deployment (CI/CD) practice into the team to help us reduce repetitive work.

CI/CD is a method to frequently deliver apps to customers by introducing automation into the stages of app development. [1]

We were following Git-flow to manage our source code and development progress. Soon after CI/CD was implemented we found that our work process did not get any faster.

Reasoning

Git Flow git flow diagram

It was a mess to use or manage the CI/CD scripts. We have so many different branches, when merging branches from one category to another different scripts are needed: feature-to-develop, develop-to-release, release-to-main, hotfix-to-main, main-to-develop, develop-to-feature, etc… Conflicts would show up everywhere! And they cannot be solved via automation scripts. The automation increased our daily workload, why?!

After some research we found that: Git-flow, by definition, is a manual/time delayed integration workflow. OK, we need a new workflow then.

Reattempt

Among several workflows we found during previous research, we decided to give GitHub-flow a try as we store our source code on GitHub.

GitHub Flow github flow diagram

This time we only have two type of branches: the main and the 'change-of-anything', and we block any commits to main directly, the only way to update main is to do a Pull Request towards main. As a result, there is only one CI/CD script required and any conflicts can be discovered and resolved during Pull Request.

New Issue

We have simplified our branching strategy; we have only one script to do CI/CD; we have Pull Request to help managing conflicts. All happy? Yes, but no.

Let’s check the pros. We have handed over the repetitive work to automation scripts, so everyone can do more productive work. The release and deploy process is handled by scripts, so any change we made locally can be deployed to server within 2 minutes.

However, there are the cons. We lost feature/version control of our system. As features are no longer stored in individual branches but in main directly after Pull Request, we cannot decide for next version which features may be on-hold and which may be released. Also, the main branch just kept updating with latest source codes, version number can ramp up hundreds in a single day.

Next Step

Fortunately we are not alone. There are people who already faced these issues, and we can follow their journey and see their solutions.

Feature toggle can be used to enable/disable any feature at any time. It can be stored in parameters, so no new release/deploy needed; even better than Git-flow which is to release different versions with different combinations of features.

Version number only ramps once we deploy a specific commit to the production environment. For the rest of the environments, we use the commit hash as the version number. This helps us to locate any bug or defect to that commit instantly.

Summary

Undoubtedly there is no perfect solution to solve all problems. GitHub flow has its flaws as well, my team and I are still working together to kaizen not just our products but also the way we work.

Personally, Git-flow is like a web portal: it categorizes everything with defined rules; if no one makes any mistake it will work just fine. On the other hand, GitHub-flow is like a search engine: we tag the version number to the commit we release/deploy to the production environment, with other environments having the commit hash as version numbers; so if there is any issue, those versions can be easily found through search.

References

  • トヨタ生産方式
  • What is CI/CD?
  • What is Continuous Integration?
  • Git flow for agile teams is a no no
  • Please stop recommending Git Flow!
  • Git Flow vs GitHub Flow
  • GitHub flow - GitHub Docs
  • Continuous Integration Contradicts Features Branches!
  • How to Achieve Continuous Deployment with Feature Flags
脚注
  1. https://www.redhat.com/en/topics/devops/what-is-ci-cd#overview ↩︎

関連記事 | Related Posts

We are hiring!

【部長・部長候補】/プラットフォーム開発部/東京

プラットフォーム開発部 について共通サービス開発GWebサービスやモバイルアプリの開発において、必要となる共通機能=会員プラットフォームや決済プラットフォームの開発を手がけるグループです。KINTOの名前が付くサービスやTFS関連のサービスをひとつのアカウントで利用できるよう、様々な共通機能を構築することを目的としています。

【フロントエンドエンジニア】新車サブスク開発G/東京・大阪

新車サブスク開発グループについてTOYOTAのクルマのサブスクリプションサービスである『 KINTO ONE 』のWebサイトの開発、運用をしています。​業務内容トヨタグループの金融、モビリティサービスの内製開発組織である同社にて、自社サービスである、TOYOTAのクルマのサブスクリプションサービス『KINTO ONE』のWebサイトの開発、運用を行っていただきます。

深圳SEO优化公司张家界外贸网站设计推荐泰安网络广告推广多少钱常州高端网站设计价格崇左网站设计模板价格淮南网站推广系统推荐海南企业网站制作价格厦门如何制作网站多少钱塔城网站搜索优化哪家好定西建网站价格拉萨网站搜索优化公司常州模板制作哪家好西安优化推荐渭南百姓网标王报价果洛SEO按天收费怀化seo网站优化湘西关键词按天收费张掖网站搭建哈尔滨建网站哪家好武威SEO按天计费多少钱通化网站搭建报价思茅网站设计模板推荐惠州推广网站台州网站推广推荐贵阳模板网站建设多少钱长葛外贸网站建设价格龙岗外贸网站设计哪家好榆林关键词排名公司赤峰seo优化价格菏泽网站推广方案价格玉溪网页制作价格歼20紧急升空逼退外机英媒称团队夜以继日筹划王妃复出草木蔓发 春山在望成都发生巨响 当地回应60岁老人炒菠菜未焯水致肾病恶化男子涉嫌走私被判11年却一天牢没坐劳斯莱斯右转逼停直行车网传落水者说“没让你救”系谣言广东通报13岁男孩性侵女童不予立案贵州小伙回应在美国卖三蹦子火了淀粉肠小王子日销售额涨超10倍有个姐真把千机伞做出来了近3万元金手镯仅含足金十克呼北高速交通事故已致14人死亡杨洋拄拐现身医院国产伟哥去年销售近13亿男子给前妻转账 现任妻子起诉要回新基金只募集到26元还是员工自购男孩疑遭霸凌 家长讨说法被踢出群充个话费竟沦为间接洗钱工具新的一天从800个哈欠开始单亲妈妈陷入热恋 14岁儿子报警#春分立蛋大挑战#中国投资客涌入日本东京买房两大学生合买彩票中奖一人不认账新加坡主帅:唯一目标击败中国队月嫂回应掌掴婴儿是在赶虫子19岁小伙救下5人后溺亡 多方发声清明节放假3天调休1天张家界的山上“长”满了韩国人?开封王婆为何火了主播靠辱骂母亲走红被批捕封号代拍被何赛飞拿着魔杖追着打阿根廷将发行1万与2万面值的纸币库克现身上海为江西彩礼“减负”的“试婚人”因自嘲式简历走红的教授更新简介殡仪馆花卉高于市场价3倍还重复用网友称在豆瓣酱里吃出老鼠头315晚会后胖东来又人满为患了网友建议重庆地铁不准乘客携带菜筐特朗普谈“凯特王妃P图照”罗斯否认插足凯特王妃婚姻青海通报栏杆断裂小学生跌落住进ICU恒大被罚41.75亿到底怎么缴湖南一县政协主席疑涉刑案被控制茶百道就改标签日期致歉王树国3次鞠躬告别西交大师生张立群任西安交通大学校长杨倩无缘巴黎奥运

深圳SEO优化公司 XML地图 TXT地图 虚拟主机 SEO 网站制作 网站优化