Xcode vs VS Code
Apples offizielle IDE Xcode trifft auf Microsofts populären Editor VS Code für die iOS-Entwicklung. Welches Tool ist für Sie produktiver?
Strukturierte Branching-Strategie — main, develop, feature, release, hotfix
Ein einziger Hauptbranch, häufige Commits, sicheres Deployment mit Feature Flags
| Kategorie | Git Flow | Trunk-Based Development |
|---|---|---|
| Performance | 6/10 | 9/10 |
| Erlernbarkeit | 5/10 | 7/10 |
| Ökosystem | 8/10 | 9/10 |
| Community | 8/10 | 9/10 |
| Arbeitsmarkt | 8/10 | 9/10 |
| Zukunftssicherheit | 5/10 | 10/10 |
# Git Flow – Vollständiges Workflow-Beispiel
# Erstinitialisierung
git flow init -d
# Branches: main, develop, feature/, release/, hotfix/
# Entwicklung eines neuen Features
git flow feature start user-profile-redesign
# → Branch feature/user-profile-redesign wurde erstellt
# Entwicklungsprozess
git add src/views/ProfileView.swift
git commit -m "feat(profile): redesign user profile card"
git add src/viewmodels/ProfileViewModel.swift
git commit -m "feat(profile): add avatar lazy loading"
# Feature abgeschlossen — in develop mergen
git flow feature finish user-profile-redesign
# → Feature-Branch gelöscht, in develop gemergt
# Release-Vorbereitung
git flow release start 2.4.0
# → Branch release/2.4.0 wurde erstellt
# Im Release-Branch nur Bugfixes!
git commit -m "fix: avatar cache invalidation on logout"
git commit -m "chore: bump version to 2.4.0"
# Release abgeschlossen
git flow release finish 2.4.0
# → In main gemergt, Tag erstellt (v2.4.0), zurück in develop gemergt
# Produktionsfehler erkannt
git flow hotfix start fix-crash-on-launch
git commit -m "fix: nil pointer in AppDelegate startup"
git flow hotfix finish fix-crash-on-launch
# → In main und develop gemergt, Tag v2.4.1# Trunk-Based Development – Täglicher Workflow
# Jeden Morgen: aktuell starten
git pull origin main
# Kurzer Feature-Branch (max. 1-2 Tage!)
git checkout -b feat/quick-login-improvement
# Kleine, atomare Commits
git add src/views/LoginView.swift
git commit -m "feat: add biometric login button"
git add tests/LoginTests.swift
git commit -m "test: biometric auth unit tests"
# Sofort in den Trunk mergen (auch unfertig — dank Feature Flag!)
git checkout main
git pull origin main
git merge feat/quick-login-improvement
git push origin main
git branch -d feat/quick-login-improvement
# Unfertiges Feature mit Feature Flag verbergen (Swift)
# FeatureFlags.swift
enum FeatureFlag: String {
case newLoginUI = "new_login_ui"
case profileV2 = "profile_v2"
case darkModeV3 = "dark_mode_v3"
}
class FeatureFlagService {
static func isEnabled(_ flag: FeatureFlag) -> Bool {
// Aus Remote Config oder lokalem Override lesen
return RemoteConfig.shared.bool(forKey: flag.rawValue)
}
}
// Verwendung in der View
if FeatureFlagService.isEnabled(.newLoginUI) {
NewLoginView()
} else {
LegacyLoginView()
}
# CI/CD-Pipeline (GitHub Actions)
# .github/workflows/ci.yml:
# on: push (branches: [main])
# → lint → test → build → Deploy Staging → Smoke-Test → Deploy ProductionFür Webdienste und SaaS-Produkte ist Trunk-Based Development der moderne Standard — perfekte Übereinstimmung mit CI/CD und schnelle Iteration. Für iOS-Apps ist eine abgespeckte Version von Git Flow (nur main- und Feature-Branches) praktikabel: Der App-Store-Review-Prozess und die Versionszyklen passen besser zu dieser Struktur. GitHub Flow (main + kurzlebige Feature-Branches) stellt einen guten Mittelweg dar.
Kostenlose Beratung erhaltenGitHub Flow ist eine vereinfachte Version: Es gibt nur main- und Feature-Branches, keinen Release- oder Develop-Branch. Ein idealer Mittelweg für kleine bis mittlere Teams.