🌳 Git Flow Workflow

Modernes Branch Management für strukturierte Entwicklung

Git Flow ist ein Branching-Modell, das eine klare Struktur für die Softwareentwicklung bietet. Es trennt Produktionsreleases, Entwicklung und verschiedene Arten von Änderungen in dedizierte Branches.

📊 Branch-Übersicht

🔴 main

Produktions-Branch

  • Nur stabile, produktionsreife Versionen
  • Geschützt durch Pull Request Review
  • Version Tags (v1.0.0, v1.1.0)
git checkout main

🔵 develop

Entwicklungs-Basis

  • Integration aller Features
  • Aktive Entwicklungs-Branch
  • Quelle für Features & Releases
git checkout develop

🟢 feature/*

Feature-Entwicklung

  • Neue Features isolieren
  • Vom develop-Branch abzweigen
  • Mit PR zurück zu develop mergen
git checkout -b feature/my-feature

🟡 release/*

Release-Vorbereitung

  • Finale Bugfixes vor Release
  • Version Bumping
  • In main & develop mergen
git checkout -b release/1.0.0

🔴 hotfix/*

Notfall-Fixes

  • Kritische Bugs in Produktion fixen
  • Vom main-Branch abzweigen
  • Sofort in main & develop mergen
git checkout -b hotfix/bug-fix

🚀 Workflow-Beispiele

1. Ein neues Feature entwickeln

git checkout develop
git pull origin develop
git checkout -b feature/user-authentication
# ... Code entwickeln ...
git add .
git commit -m "Add user authentication"
git push origin feature/user-authentication
# → Pull Request erstellen

2. Release vorbereiten

git checkout -b release/1.0.0 develop
# Version in package.json/CHANGELOG.md aktualisieren
git add .
git commit -m "Bump version to 1.0.0"
git push origin release/1.0.0
# → PR zu main & develop erstellen

3. Kritischen Bug fixen (Hotfix)

git checkout main
git pull origin main
git checkout -b hotfix/critical-bug-fix
# ... Bug fixen ...
git add .
git commit -m "Fix critical bug in production"
git push origin hotfix/critical-bug-fix
# → Sofort in main & develop mergen

📈 Best Practices

📊 Git Flow Statistiken

2
Langzeit-Branches
3
Branch-Typen
∞
Parallele Features
1
Release am Ende