-
安装(只介绍mac下的安装)
1
2brew update
brew install git-flow-avh -
将远程GitflowDemo克隆到本地,并进入GitflowDemo目录:
1
2首先初始化:
git flow init -
开发新功能(feature):
1
2git flow feature start my-feature
Switched to a new branch 'feature/my-feature' -
在新分支my-feature上添加新功能:
1
2
3
4
5$ git add test.txt
$ git commit -m "create test.txt"
[feature/my-feature e783fdf] create test.txt
1 file changed, 1 insertion(+)
create mode 100644 test.txt1
2
3$ git status
On branch feature/my-feature
nothing to commit, working tree clean -
完成开发,合并到develop分支上:
1
2
3
4
5
6
7
8
9
10
11
12
13git flow feature finish my-feature
Switched to branch 'develop'
Updating bde3a64..e783fdf
Fast-forward
test.txt | 1 +
1 file changed, 1 insertion(+)
create mode 100644 test.txt
Deleted branch feature/my-feature (was e783fdf).
Summary of actions:
- The feature branch 'feature/my-feature' was merged into 'develop'
- Feature branch 'feature/my-feature' has been locally deleted
- You are now on branch 'develop'1
2
3$ git branch
* develop
master -
就这样完成了合并到develop分支上s
近期评论