Git-flow 工作流

Git-flow 工作流

https://github.com/petervanderdoes/gitflow-avh
http://jeffkreeftmeijer.com/2010/why-arent-you-using-git-flow/
http://danielkummer.github.io/git-flow-cheatsheet/

安装:
https://github.com/petervanderdoes/gitflow-avh/wiki/Installation

Git-flow 介绍:
https://jeffkreeftmeijer.com/git-flow/

Git-flow 相关指令:
- git flow init 初始化项目
- git flow feature start feature_name 创建功能分支
- git flow feature finish feature_name 完成功能分支
- git flow release start version 创建预发布分支
- git flow release finish version 完成预发布分支
- git flow hotfix start assets 创建快速修复分支
- git flow hotfix finish assets 完成快速修复分支


指令简介

git flow init

初始化 git-flow
默认:

Branch name for production releases: [master]
Branch name for "next release" development: [develop]

各个类型分支前缀:

How to name your supporting branch prefixes?
Feature branches? [feature/]
Bugfix branches? [bugfix/]
Release branches? [release/]
Hotfix branches? [hotfix/]
Support branches? [support/]
Version tag prefix? []

git flow feature start/finish/publish/pull feature_name

work on multiple features at the same time

start 解析:
1、基于 develop 分支创建一个新的分支 feature/authentication
2、切换至 feature/authentication 分支

$ git flow feature start authentication
Switched to a new branch 'feature/authentication'

Summary of actions:
- A new branch 'feature/authentication' was created, based on 'develop'
- You are now on branch 'feature/authentication'

Now, start committing on your feature. When done, use:

     git flow feature finish authentication

finish 解析:
1、切换至 develop 分支
2、merge feature/authentication 分支
3、删除 feature/authentication 分支

$ git flow feature finish authentication
Switched to branch 'develop'
Updating 9060376..00bafe4
Fast-forward
 authentication.txt | 1 +
 1 file changed, 1 insertion(+)
 create mode 100644 authentication.txt
Deleted branch feature/authentication (was 00bafe4).

Summary of actions:
- The feature branch 'feature/authentication' was merged into 'develop'
- Feature branch 'feature/authentication' has been removed
- You are now on branch 'develop'

git flow release start/finish/publish/pull version

ready to deploy a new version to production

start 解析:
1、以 develop 为基础创建一个预发布版本分支 release/0.1.0
2、切换分支至 release/0.1.0

$ git flow release start 0.1.0
Switched to a new branch 'release/0.1.0'

Summary of actions:
- A new branch 'release/0.1.0' was created, based on 'develop'
- You are now on branch 'release/0.1.0'

Follow-up actions:
- Bump the version number now!
- Start committing last-minute fixes in preparing your release
- When done, run:

     git flow release finish '0.1.0'

finish 解析:
1、切换分支至 master
2、合并 release/0.1.0 分支
3、为当前 master 打tag 0.1.0
4、将 release/0.1.0 合并到 develop
5、删除 release/0.1.0 分支

$ git flow release finish 0.1.0
Switched to branch 'master'
Merge made by the 'recursive' strategy.
 authentication.txt | 1 +
 1 file changed, 1 insertion(+)
 create mode 100644 authentication.txt
Deleted branch release/0.1.0 (was 1b26f7c).

Summary of actions:
- Latest objects have been fetched from 'origin'
- Release branch has been merged into 'master'
- The release was tagged '0.1.0'
- Release branch has been back-merged into 'develop'
- Release branch 'release/0.1.0' has been deleted

git flow hotfix start/finish/publish/pull assets

quickly fix any issues on production

start 解析:
1、以master 分支为基础创建一个 assets 分支
2、切换分支至 assets

$ git flow hotfix start assets
Switched to a new branch 'hotfix/assets'

Summary of actions:
- A new branch 'hotfix/assets' was created, based on 'master'
- You are now on branch 'hotfix/assets'

Follow-up actions:
- Bump the version number now!
- Start committing your hot fixes
- When done, run:

     git flow hotfix finish 'assets'

finish 解析:
1、切换 master 分支
2、合并 assets 分支
3、打tag 0.1.1
4、合并 assets 分支至 develop
5、删除 assets 分支

$ git flow hotfix finish assets
Switched to branch 'master'
Merge made by the 'recursive' strategy.
 assets.txt | 1 +
 1 file changed, 1 insertion(+)
 create mode 100644 assets.txt
Switched to branch 'develop'
Merge made by the 'recursive' strategy.
 assets.txt | 1 +
 1 file changed, 1 insertion(+)
 create mode 100644 assets.txt
Deleted branch hotfix/assets (was 08edb94).

Summary of actions:
- Latest objects have been fetched from 'origin'
- Hotfix branch has been merged into 'master'
- The hotfix was tagged '0.1.1'
- Hotfix branch has been back-merged into 'develop'
- Hotfix branch 'hotfix/assets' has been deleted

补充说明

publish 发布至远程仓库
pull origin 从远程仓库拉下代码

使用场景

背景:
存在 测试环境(test)对应develop分支、预发布环境(pre)对应 release、生产环境(pro)tag,三个环境

开发:

  • feature 类型分支尽可能少协作开发,本地开发完成就push至远程 develop 分支由测试人员进行测试
  • 项目负责人自我衡量是否发 release
  • release 分支测试完成后就可以发布到 pro 环境
  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
一、设计数据表 1.数据表主键设置为nvarchar(36) 2.必须包含Title字段(作为表单标题) 3.必须包括是否完成的标识字段(int型默认值0) 二、codesmith,狼奔生成工具生成代码 1.用codesmith(运行 源代码目录=>WFTemplate=>test_WF.cst)替换狼奔生成Controllers文件中的Create与Edit方法 2.Views中添加codesmith生成的Create与Details文件 三、程序配置 1.数据字典配置(系统设置=》基础设置=》数据字典) 参照请假(需要在表单类型中添加相应流程页面:添加页面Create.cshtml与查看页面Details.cshtml) 格式: 名称:XXX(路径) 例如:请假(~/Views/TempTest/Create.cshtml) 父节点:表单类型 表名:Form 字段:Form 2.菜单配置(系统设置=》菜单管理) 需要在“/WorkFlowRun/Index”路径后面配置设计好的流程ID(系统设置=》流程设置:打开相应流程点击属性按钮可查看流程ID) 例如请假申请菜单 “/WorkFlowRun/Index?flowid=A6509C1B-F49F-47A6-829D-EC43B9210EB2” 3.流程设置(系统设置=》流程设置) 打开:打开已保存的流程 新建:新建新流程 属性:查看流程基础设置包括基本信息、数据连接、标识字段 数据连接:配置流程表主键字段 标识字段:配置流程是否完成标识字段 新步骤:创建新步骤,双击步骤进行步骤设置(基本=>表单,下拉列表数据源来自于数据字典中的表单类型第一个步骤选择Create,之后步骤选择Details) 注:配置好的流程需安装之后才生效! 四、.Net微信公众平台开发 WeiXinController.cs中封装了微信开发接口 在线浏览:http://qxw1194750243.my3w.com/Home
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值