Hop3 Git Branching Strategy¤
The Hop3 project uses a structured branching model to ensure both a stable release for users and a clear path for ongoing development. This strategy allows for parallel development of new features, preparation of new releases, and quick maintenance of production code.
Main Branches¤
The repository has two long-lived main branches:
stable¤
- Purpose: This is the production-ready branch. It always contains the latest stable, released version of Hop3.
- Users: End-users who want to install and use Hop3 should clone or check out this branch.
- State: This branch is intended to be highly stable. Direct commits are discouraged; changes are merged in from
releaseorhotfixbranches. - Current Version:
v0.3.0
devel¤
- Purpose: This is the primary development branch. All new features, refactoring, and other ongoing work are integrated here. It represents the “next” version of the software.
- Users: Contributors who want to add new features or fix non-critical bugs should base their work on this branch.
- State: This branch is actively developed and may be unstable at times. All automated tests must pass before code is merged into
devel. - Current Version: Work-in-progress towards
v0.4.0
Supporting Branches¤
Several types of short-lived branches are used to manage the development and release process.
1. Feature Branches¤
- Purpose: To develop new features or significant refactors.
- Branch from:
devel - Merge to:
devel - Naming Convention: There is no strict convention, but descriptive names are used (e.g.,
refact-certificates,feature/sbom-generator). - Workflow:
- A contributor forks the repository.
- Creates a new feature branch from the latest
devel. - Makes their changes and commits them.
- Submits a Pull Request (PR) to merge their feature branch back into the main repository’s
develbranch.
2. Release Branches¤
- Purpose: To prepare a new production release. This branch is used for stabilization, final testing, documentation updates, and version bumping. No new features are added to a release branch.
- Branch from:
devel - Merge to:
stable(for the official release) anddevel(to incorporate any stabilization fixes). - Naming Convention:
release/vX.Y(e.g.,release/v0.4). - Workflow:
- When
develis considered feature-complete for the next release, arelease/branch is created. - Bug fixes and final tweaks are made on this branch.
- Once stable, the release branch is merged into
stableand tagged with the version number (e.g.,v0.4.0). - The release branch is also merged back into
develto ensure any last-minute fixes are not lost.
- When
3. Hotfix Branches¤
- Purpose: To quickly patch a critical bug in a production version.
- Branch from:
stable - Merge to:
stableanddevel. - Naming Convention:
hotfix/vX.Y.Z(e.g.,hotfix/v0.3.1). - Workflow:
- A
hotfix/branch is created from thestablebranch. - The critical bug is fixed and committed.
- The branch is merged back into
stableand tagged with a new patch version. - It is also merged into
develto ensure the fix is included in future releases.
- A
Summary of the Workflow¤
- Contributors: Fork the repo, create feature branches from
devel, and submit Pull Requests back todevel. - Users: Use the
stablebranch for a reliable installation. - Maintainers: Manage the release cycle by creating
releasebranches fromdeveland merging them intostableand back intodevel. Urgent production fixes are handled withhotfixbranches.