TodolistProject

Git Branching Strategy

This document proposes a Git branching strategy for structured collaboration within the project.


1. Motivation

In multi-module projects with separate responsibilities (e.g. Arduino, Backend, Frontend, Database), a clearly defined branching strategy helps to:


2. Strategy selection

The following models were evaluated:

Among these, a combination of GitHub Flow and Trunk-Based Development is proposed, as it allows:

Rules:


3. Branch naming

Type/action-module

Type Example Use case
feature feature/add-backend-api New functionality
fix fix/mqtt-reconnect Bug fix
docs docs/update-readme Documentation
test test/add-backend-tests Testing-related change
chore chore/update-gitignore Setup or config change

Use lowercase and dashes.


4. Developer workflow

  1. Create a feature branch from main:
     git checkout main
     git pull origin main
     git checkout -b feature/<task-name>
    
  2. Git commit and push the branch to GitHub:
     git commit
     git push origin feature/<task-name>
    
  3. Create a Pull Request in github

  4. Code Review

  5. After successful review and test, merge and delete the branch: ```bash git branch -d feature/ git push origin --delete feature/

``` ___

5. Merge and CI

\newpage