--- source_keys: - nvie-gitflow-post - atlassian-gitflow-tutorial - gitflow-cheatsheet --- # Branch patterns Which pattern is in play decides the base branch, the branch name prefix, and whether merges are allowed to fast-forward. Default to GitHub Flow — simpler, and what CI/CD-oriented repos expect. Fall back to Gitflow only when the config says so or the repo already carries `develop` or `release/*` branches. ## GitHub Flow - Base: `main` - Feature branches: `feature/` or `fix/` - Merge: fast-forward where possible, to keep history linear - Delete the branch after merge ## Gitflow - Base: `main` (production) plus `develop` (integration) - Feature branches: `feature/`, cut from `develop` - Release branches: `release/X.Y.Z`, cut from `develop`, merged to both `main` and `develop` - Hotfix branches: `hotfix/X.Y.Z`, cut from `main`, merged to both `main` and `develop` - Merge: always `--no-ff`, so the branch structure survives in the history The two are not mixable. A `--no-ff` merge into a GitHub Flow repo leaves merge commits nobody expects; a fast-forward merge of a Gitflow release branch erases the release boundary.