Branching Strategies
This document outlines the branching strategies used for the AISpec project.
Branching Model
The project uses a Gitflow workflow, which is a branching model that provides a structured way to manage development and releases.
- Main Branch: This branch represents the current production version of the code. It should only be updated with releases and bug fixes.
- Develop Branch: This branch is where new features are developed. Once features are ready, they are merged into the main branch.
- Feature Branches: Each new feature is developed on its own feature branch. Once a feature is complete, it is merged into the develop branch.
- Release Branches: Once the develop branch is stable and ready for release, a new release branch is created. Bug fixes are applied to the release branch. Once the release is ready, it is merged into the main branch.
- Hotfix Branches: These are created when a critical bug needs to be fixed in the production code. They are branched off the main branch and merged back into both the main and develop branches.
Branching Example
Here’s an example of how the Gitflow workflow would be used for developing a new feature:
- Create a feature branch:
git checkout -b feature/new-feature develop
- Develop the feature: Add code and commit changes to the feature branch.
- Merge into the develop branch:
git checkout develop
git merge feature/new-feature
- Resolve conflicts: If there are any conflicts, resolve them and commit the changes.
- Push the develop branch:
git push origin develop
Benefits of Gitflow Workflow
- Reduces the risk of merging conflicts: By working on features on separate branches, developers can avoid merging conflicts with the main branch.
- Simplifies the process of releasing new versions: The Gitflow workflow provides a clear and structured way to manage releases.
- Makes it easier to track development progress: The branching model makes it easy to see what features are in development and what features are ready for release.