- Git is a popular branching strategy that uses two main branches. One is master and another one is develop.
- The master branch contains production-ready code, while the develop branch contains the latest development code.
- Feature branches are created off the develop branch, and when the feature is complete, it is merged back into the develop branch. When the develop branch is ready for release, it is merged into the master branch, and a new release is created.
Feature branching:
- The basic idea behind feature branching is that each new feature is developed on its own branch.
- This approach allows for isolated development and testing of features, making it easier to roll back if needed.
- Feature branching is a great option for smaller projects or teams that want a straightforward branching strategy.
Release branch:
- Release branching is a branching strategy that involves creating a new branch for each release of a project.
- This approach allows for final testing and bug fixing on the release branch before it is merged into the master branch for production.
- Release branching is useful for projects with shorter release cycles or when testing is required for each release.
- However, it can be challenging to manage multiple release branches simultaneously.
Hotfix vs Bugfix branch:
Hotfix |
Bugfix |
A fix on live, active software or apps. |
A fix for issues found through development life cycle but before release. |
Zero to minimal downtime for users. |
Zero impact on users. |
Immediately for live systems. |
Applied during production or testing phases. |
Git Upstream and Downstream:
- Most of the time, we will be working on a project with other developers. In these cases, we have one central remote repository, where we clone our local copy, and one local repository, where we’re working on features and pushing them to that remote repository.
- In a nutshell, any repository that we clone from, or pull from, or push to, is called the Upstream and our local repository is known as the Downstream.