快速安装(必须全局安装)
npm install node-change-varsion -g
实际项目目录
下)
使用(在先进行gitflow初始化
git flow init
以下是命令
node-gitflow feature-start -b branchName -p
参数说明:
-b [必填] 新建feature下的分支名,branchName为其值
-p [选填] 是否推送到远程(默认不推送)
示例:
新建feature/test分支并推送到远程
node-gitflow feature-start -b test -p
新建feature/test分支不推送到远程
node-gitflow feature-start -b test
node-gitflow feature-finish -b branchName -p
参数说明:
-b [必填] 将本地feature下的branchName分支合并到本地develop分支
-p [选填] 是否将本地的develop分支推送到远程develop分支,默认不推送
示例:
合并feature/test分支到develop分支
node-gitflow feature-finish -b test
node-gitflow hotfix-start -b branchName -p
参数说明:
-b [必填] 新建hotfix下的分支名,branchName为其值,不填则使用计算好的version
-p [选填] 是否推送到远程(默认不推送)
示例:
新建hotfix/test分支并推送到远程
node-gitflow hotfix-start -b test -p
新建hotfix/test分支
node-gitflow hotfix-start -b test
node-gitflow hotfix-finish -b branchName -p
参数说明:
-b [必填] 推送到远程hotfix下的分支名,branchName为其值,branchName作为标签tagName
-p [选填] 是否推送到远程(默认不推送)
示例:
合并hotfix/test分支到develop和master、推送到远程hotfix/test分支
node-gitflow hotfix-finish -b test -p
合并hotfix/test分支到develop和master
node-gitflow hotfix-finish -b test
node-gitflow release-start -b branchName -p
参数说明:
-b [必填] 新建release下的分支名,branchName为其值,不填则使用计算好的version
-p [选填] 是否推送到远程(默认不推送)
示例:
新建release/test分支,并推送到远程
node-gitflow release-start -b test -p
新建release/test分支到develop和master
node-gitflow release-start -b test
node-gitflow release-finish -b branchName -p
参数说明:
-b [必填] 推送到远程release下的分支名,branchName为其值,branchName作为标签tagName
-p [选填] 是否推送到远程(默认不推送)
示例:
合并release/test分支到develop和master、推送到远程release/test分支
node-gitflow release-finish -b test -p
合并release/test分支到develop、master,并推送到远程
node-gitflow release-finish -b test -p