How well do you know Git branching strategies?
A well-planned Git branching strategy helps coordinate the development team’s work and keeps the development process consistent.
When formulating your branching strategy, it's important to take into account the project’s complexity, the team’s size, and the release cycle.
Let's take a look at some common approaches to branching:
A developer’s set of tasks quite often revolves around a feature - whether it's developing it or maintaining it. This is why feature branching is a popular approach. It involves having a branch for every feature being developed to keep the changes isolated from the main branch. Code reviews are simplified as all changes are contained in one branch.
With Gitflow, there are two permanent branches — a production and a pre-production branch, often referred to as the “prod” and “dev” branches. There are additional temporary branches for each feature that is currently being developed, release branches for scheduled releases, and branches for urgent bug fixes.
All changes other than urgent bug fixes are merged into the dev branch. After enough changes have been gathered, a release branch is created for further cleaning and testing. Once it's ready for production, the release branch is merged into the prod branch. Urgent bug fixes are merged into the prod branch directly. This is a great approach for projects with scheduled release cycles and multiple production versions.
GitLab flow combines feature-branching and environment-based branching. Changes are merged into a main branch which is then merged into subsequent branches that correlate to an environment in the CI/CD pipeline; such as staging and production. This strategy offers a more flexible alternative to Gitflow and better facilitates continuous development.
GitHub flow takes a very lightweight and simplified process that is similar to feature branching. The key difference is that GitHub flow incorporates the deployment process into its approach. The main branch always represents a production-ready state where changes to this branch trigger the CI/CD process; this isn't the case with feature branching.
Branches are very short-lived with trunk-based development. Changes are merged into the main branch within a day or two. Feature flags are used for changes that require a longer period of time to compete. This strategy requires very disciplined processes and excellent testing to facilitate such quick iterations. It's become a popular approach for very large teams who have the capacity to implement the required processes and where large merge conflicts can occur very frequently.
Each strategy mentioned above offers a small variation from the others. This is the exact approach that should be taken when formulating a branching strategy for a specific project and team. Take the most relevant features of the above strategies and apply your own set of changes. Every project and team has its own set of unique needs, which should be reflected in their Git branching strategy.
——
Want more engineering insights like this?
Subscribe to our free newsletter for a weekly deep-dive and roundup of all our best content → https://t.co/oSSc0CTYp9
Just built the 𝗦𝘄𝗶𝗿𝗹𝗔𝗜 𝗧𝗮𝗯𝗹𝗲 𝗼𝗳 𝗖𝗼𝗻𝘁𝗲𝗻𝘁𝘀.
I have now written and sent out almost 40 SwirlAI Newsletter episodes touching different topics around end-to-end Data Systems (Data Engineering, MLOps, Machine Learning, Infrastructure, Building Scalable Data Organisations and more).
The value of most of the content in this Newsletter is meant to be timeless - the content can be read long after the episodes are released. However, until now it was complicated to find topics of interest as they are scattered throughout newsletter issues with no clear ordering or grouping. Hence, I built a Table of Contents that I will be updating and curating.
The amount of content that really surprised me. There are more than 90 topics covered that are supplemented by an infographic drawn in my style!
𝗣𝗿𝗲𝗺𝗶𝘂𝗺 𝗦𝘂𝗯𝘀𝗰𝗿𝗶𝗽𝘁𝗶𝗼𝗻 𝗧𝗶𝗲𝗿.
Together with the TOC I am announcing a Premium Subscription Tier for SwirlAI Newsletter. It will include 6 (and sometimes more) Newsletter episodes per month and full access to the content archive. Non-premium readers will receive 1-2 monthly Newsletter episodes.
With time I will be introducing new bonus perks for Paid Subscribers - Private Community, Participation in decision on what I write about, AMA sessions, end-to-end hands on tutorials and projects etc.
Check out the Table of Contents here: https://t.co/VwvbOu1a0Q
--------
Follow me to upskill in #MLOps, #MachineLearning, #DataEngineering, #DataScience and overall #Data space.
Also hit 🔔to stay notified about new content.
𝗗𝗼𝗻’𝘁 𝗳𝗼𝗿𝗴𝗲𝘁 𝘁𝗼 𝗹𝗶𝗸𝗲 💙, 𝘀𝗵𝗮𝗿𝗲 𝗮𝗻𝗱 𝗰𝗼𝗺𝗺𝗲𝗻𝘁!
Join a growing community of Data Professionals by subscribing to my 𝗡𝗲𝘄𝘀𝗹𝗲𝘁𝘁𝗲𝗿.
* People ask LLMs to write code
* LLMs recommend imports that don't actually exist
* Attackers work out what these imports' names are, and create & upload them with malicious payloads
* People using LLM-written code then auto-add malware themselves
https://t.co/Va9w18RpWu
I just put all my technical threads in one big PDF. It has 75 topics and 158 pages!
Here are some sample topics:
🔹 Why is Redis fast?
🔹 Design Google Maps
🔹 How does HTTPs work?
The PDF Link is in the first post of my newsletter: https://t.co/PczMAd8Jdb
Hope it's helpful.