Git Branching Strategies
What are common Git branching strategies? Describe GitFlow or trunk-based development.
Git Branching Strategies
What are common Git branching strategies? Describe GitFlow or trunk-based development.
Common strategies include GitFlow (feature branches, develop, release, and main branches with structured releases), GitHub Flow (simple feature branches merged to main with continuous deployment), and trunk-based development (short-lived branches or direct commits to main with feature flags). Trunk-based development is preferred for CI/CD as it reduces merge conflicts and enables faster delivery.
Branching strategies directly impact deployment frequency and team collaboration. DevOps engineers help teams choose and implement strategies that support their CI/CD goals. Understanding trade-offs helps optimize the development workflow.
Common branch operations
- Long-lived feature branches causing merge conflicts
- Not keeping branches up-to-date with main
- Using complex branching when simple approaches would work
- What are the pros and cons of GitFlow vs trunk-based development?
- How do feature flags enable trunk-based development?
- When would you use a release branch?