Git Workflow Guide
For a 5-person team | Public GitHub Repository | Active Development + Releases + Experiments
1. Long-lived branches
| Branch | Purpose | Who can push directly |
|---|---|---|
main | Only production-ready code | Owner / tech lead only |
develop | Integration branch – all new features go here | Only via Pull Request |
2. Short-lived branches
| Prefix | Example | When to create |
|---|---|---|
feature/ | feature/user-avatars | Regular new functionality |
hotfix/ | hotfix/payment-bug | Urgent production fix |
release/ | release/2.1.0 | Preparing a new release |
experiment/ | experiment/ai-assistant | Experiments (see how to hide below) |
3. Daily workflow
For Core Team:
git checkout develop
git pull origin develop
git checkout -b feature/your-task-name
# work → commit often
git push -u origin feature/your-task-nameFor External Contributors:
- Fork the repository.
- Clone your fork.
- Create a branch from
develop. - Push to your fork.
Creating a Pull Request:
- Open Pull Request →
develop. - Link issue in description:
Fixes #123. - Wait for ≥1 approval + CI green.
- Merge (Squash and merge recommended).
4. Commit Messages
We follow the Conventional Commits specification. This allows us to automatically generate changelogs and determine semantic versioning.
Format: <type>(<scope>): <description>
Types:
feat: A new featurefix: A bug fixdocs: Documentation only changesstyle: Changes that do not affect the meaning of the code (white-space, formatting, etc)refactor: A code change that neither fixes a bug nor adds a featureperf: A code change that improves performancetest: Adding missing tests or correcting existing testschore: Changes to the build process or auxiliary tools and libraries such as documentation generation
Examples:
feat(api): add new endpoint for user profilefix(web): resolve issue with login buttondocs: update readme with setup instructions
We use commitlint to enforce these rules. If your commit message does not follow the convention, the commit will be rejected.
5. Release Process & Docker Build
Goal: Publish a production-ready Docker container to the registry (GHCR/DockerHub).
Prepare Release:
bashgit checkout develop git checkout -b release/2.1.0 # bump versions (package.json, pyproject.toml) # update CHANGELOG.md git commit -m "Bump version to 2.1.0" git push origin release/2.1.0Open PR to
main. After approval and merge:Create Tag (Build Trigger):
bashgit checkout main git pull origin main git tag -a v2.1.0 -m "Release 2.1.0" git push origin v2.1.0Automated Build (CI/CD): GitHub Actions detects the
v*tag push, as well as pushes tomainanddevelop:- Builds the Docker image.
- Tags it as
latest(for main),dev(for develop), andv2.1.0(for tags). - Pushes to Container Registry.
- Creates a GitHub Release (for main only).
Cleanup: Merge
release/2.1.0(ormain) back intodevelopto sync versions.
6. Hotfixes
Same as release but from main → create hotfix/... → merge to main + tag patch version → merge back to develop.
7. Automation
GitHub Actions:
- Tests on every PR and push to
develop/main(ci.yml) - Build & push Docker image on push to
main,develop, orv*tag (docker-publish.yml) - Create Release on push to
main(release.yml)
8. Artifact storage
- Docker images → GitHub Container Registry
- Packages → GitHub Packages
- Binaries → GitHub Releases