Skip to content
Go back

Git Branch Guidelines

Updated:

Problems We Face in Day-to-Day Development

Goals of Branch Management

A Reference From a Predecessor

A successful Git branching model
By Vincent Driessen on Tuesday, January 05, 2010

A successful Git branching model

This is not official Git or GitHub documentation. It’s a personal summary based on that author’s team at the time, so it doesn’t map directly to our current workflow. After studying Git Flow, we defined our own team conventions.

Our Conventions

我们的Git分支模型

feature/sprintXX

test/sprintXX

hotfix/yyyyMMdd

develop

master

Branch Operations

Use rebase on feature/sprintXX branches

To keep a clean commit graph. git pull defaults to merge, so you can use rebase:

git pull --rebase

# also set a global config
git config --global pull.rebase true
git config --global branch.autoSetupRebase always

Use no-ff for merges

Fast-forward merges produce a straight line and hide the branch history. Using --no-ff makes feature branch merges explicit:

# Merge sprint01 into develop
git merge --no-ff feature/sprint01

Share this post on:

Previous Post
Git Commit Guidelines
Next Post
Code Review Practice