xl7dev

git-flow usage

创建develop分支

1
2
git branch develop
git push -u origin develop

开始新Feature开发

1
2
3
4
5
git checkout -b some-feature develop
git push -u origin some-feature
git status
git add some-file
x`git commit

完成Feature

1
2
3
4
5
6
git pull origin develop
git checkout develop
git merge --no-ff some-feature
git push origin develop
git branch -d some-feature
git push origin --delete some-feature

开始Relase

1
git checkout -b release-0.1.0 develop

完成Release

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
git checkout master
git merge --no-ff release-0.1.0
git push

git checkout develop
git merge --no-ff release-0.1.0
git push

git branch -d release-0.1.0

# If you pushed branch to origin:
git push origin --delete release-0.1.0

git tag -a v0.1.0 master
git push --tags

开始Hotfix

1
git checkout -b hotfix-0.1.1 master

完成Hotfix

1
2
3
4
5
6
7
8
9
10
11
12
git checkout master
git merge --no-ff hotfix-0.1.1
git push

git checkout develop
git merge --no-ff hotfix-0.1.1
git push

git branch -d hotfix-0.1.1

git tag -a v0.1.1 master
git push --tags