Workflow Guide
Git workflow cheat sheet online. Learn Git Flow, trunk-based development, and feature branching with visual diagrams. Free Git guide.
Git Flow
A branching model with dedicated branches for features, releases, and hotfixes.
Branch Structure
main Production-ready code
develop Integration branch for features
feature/* New features in development
release/* Release preparation
hotfix/* Urgent production fixes
Visual Flow
Common Commands
Start a feature
git checkout -b feature/my-feature developFinish a feature
git checkout develop && git merge --no-ff feature/my-featureStart a release
git checkout -b release/1.0.0 developFinish a release
git checkout main && git merge --no-ff release/1.0.0 && git tag -a 1.0.0Start a hotfix
git checkout -b hotfix/fix-bug mainFinish a hotfix
git checkout main && git merge --no-ff hotfix/fix-bug && git checkout develop && git merge --no-ff hotfix/fix-bug✅ Pros
- • Clear separation of concerns
- • Parallel development
- • Versioned releases
⚠️ Cons
- • Complex workflow
- • Many branches to manage
- • Slower releases
When to Use Each Workflow
Git Flow - Large teams, versioned releases, enterprise
Trunk-Based - CI/CD focused, experienced teams, web apps
GitHub Flow - Small teams, continuous deployment, SaaS
Feature Branch - Simple projects, beginners, small teams
Features
- Visual diagrams for Git Flow, GitHub Flow, and Trunk-Based Development
- Step-by-step command guides
- Pros and cons for each workflow
- Interactive command copying
Common Use Cases
- Choosing the right workflow for your team
- Onboarding a new developer
- Understanding complex branching strategies
Git Workflows
A Git Workflow defines how a team uses Git to collaborate. It establishes rules for creating branches, merging code, and deploying releases.
Examples
Valid - Git Flow
git flow init Valid - Feature Branch
git checkout -b feature/new-ideaFrequently Asked Questions
Which workflow is best?
Trunk-based is great for CI/CD and fast iteration. Git Flow is better for scheduled releases.
What is a "main" branch?
The primary branch where production-ready code lives (formerly "master").
What is a Pull Request?
A request to merge code from one branch into another, allowing for code review.
Tips
- Start with GitHub Flow (simple feature branches) if you represent a small team.