I want to talk a little bit about Git's branch management. As you know, Git is a super powerful tool that can do a million things. So, I'll focus on just one tiny aspect of it.
A bit of background: We're a small team, but our product has a ton of features. At any given time, we have several feature branches open. Here's how we manage them:
We have three core branches:
- Master branch: This reflects what's currently in production and maps to our latest tags.
- Develop branch: This contains the latest changes at any given time, with some caveats.
- Develop interim branch: We didn't have this branch six months ago, but we found a need for it. Initially, it's in sync with the develop branch, pointing to the same commit IDs.
When we work on a new feature (let's say a UI enhancement), we create a new branch off of develop interim, make the necessary changes, and then proceed with the review, merge, and deploy process (RMD). We review the changes, make any necessary adjustments based on feedback, and then proceed with the merge.
We merge the feature branch into develop interim, not directly into develop, to avoid discrepancies and potential dependencies. Once other changes, like API updates, are completed, we follow the same process across other repositories. If everything looks good after deploying to development or testing environments, we merge the changes forward to develop.
Given that we often work on multiple features simultaneously and await feedback from other team members, we sometimes face merge conflicts. In such cases, we decide whether to create a new branch off of develop interim or work on the existing feature branch, considering the potential for conflicts.
Once we're satisfied with the merged changes in develop interim and have thoroughly tested them, we merge them into develop. After deploying to a different server and ensuring stability, we proceed with further testing and eventually deploy to production, creating a tag in the process.
That's a high-level overview of our Git management process. Thank you.
Top comments (0)