Transcript

git flow - Progmatic SCM for Developers

Lifu Zhang

Elektrobit Wireless(2011), Company Confidental

1 / 12git flow - Progmatic SCM for Developers

N

Outline

1 Outline

2 Ideal Git Branching

3 Git Flow Brief

4 Using Git Flowcreate new feature branchesrelase a new versionfix bug in released version

5 Reference

2 / 12git flow - Progmatic SCM for Developers

N

Develop with develop branch

master - softwarereleases, only stablecode permitted

develop - everycommits, encourgemore commits

Take advantage offrequent commits,while we still couldfind stable code

3 / 12git flow - Progmatic SCM for Developers

N

Add feature by feature branch

Decenteralize theworks

Feature could bemerge back intodevelop

A feature could beadd in next release

4 / 12git flow - Progmatic SCM for Developers

N

Develop with develop branch

Bugs occurseverytime

A hotfix should beapplied to bothdevelop & master

A hotfix could be aminor release aftermerge

5 / 12git flow - Progmatic SCM for Developers

N

Overview of ideal branching

6 / 12git flow - Progmatic SCM for Developers

N

gitflow brief

Git flow is a module of git, this tool could help us manage code as”A successful Git branching model” it only have 4 commands:

git flow init

git flow feature

git flow release

git flow hotfix

7 / 12git flow - Progmatic SCM for Developers

N

Install gitflow

Get Git Flow Code from: https://github.com/nvie/gitflowif you failed at ’git submodule update’ run command in your gitflowsource directory:$sed -i -e ”s:/git:/http:/” ‘grep ’git://’ -lr .‘

$sudo make [INSTALL PRFIX=xxx] install

8 / 12git flow - Progmatic SCM for Developers

N

Create New Feature

git flow feature start xxx

A lots of commits . . .

git flow feature finish xxx

(if you forget your feature name, you can run $git flow feature tosee it)

After a feature finish, it will be merged into ’develop’

9 / 12git flow - Progmatic SCM for Developers

N

Start a Release

git flow release start x.x.x

A lots of comits . . .

git flow release finish x.x.x

After rel finish, changes will be merged both into master anddevelop, and a tag will be created, so the master won’t be aheadof develop

10 / 12git flow - Progmatic SCM for Developers

N

Fix a Bug

Bugs occurs every time, after release, we could use git flow hotfixto start a bug fix procedure.hotfix will be merged to master and develop, and a tag will begenerated.

11 / 12git flow - Progmatic SCM for Developers

N

Jeff Kreeftmeijer. Why aren’t You Using git-flow?

Git flow official(host by github)

12 / 12git flow - Progmatic SCM for Developers

N

top related