美文网首页
git-flow 初探

git-flow 初探

作者: 八喜_ne | 来源:发表于2019-12-27 17:06 被阅读0次

安装git-flow 请自行搜索

-$ git flow init

Initialized empty Git repository in /Users/tobi/acme-website/.git/
Branch name for production releases: [master] 
Branch name for "next release" development: [develop] 

How to name your supporting branch prefixes?
Feature branches? [feature/] 
Release branches? [release/] 
Hotfix branches? [hotfix/] 

git-flow 模式会预设两个主分支在仓库中:

  • master 生成分支
  • develop 开发分支

我们接下来进行创建开发功能的分支ne-demo,使用 \color{red} {git\ flow\ feature\ start} new-demo 进行分支创建如下:

bogon:helloworld baxi$ git flow feature start new-demo
Switched to a new branch 'feature/new-demo'

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

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

     git flow feature finish new-demo

功能开发成功后,执行\color{red}{git\ flow\ feature\ finish } new-demo

bogon:helloworld baxi$ git flow feature finish new-demo
Switched to branch 'dev'
Your branch is up to date with 'origin/dev'.
Updating 5c7117b..495fcd8
Fast-forward
 src/components/common/com-filter-panel.vue | 1 -
 1 file changed, 1 deletion(-)
Deleted branch feature/new-demo (was 495fcd8).

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

管理releases

当你认为现在在 “develop” 分支的代码已经是一个成熟的 release 版本时,这意味着:第一,它包括所有新的功能和必要的修复;第二,它已经被彻底的测试过了。如果上述两点都满足,那就是时候开始生成一个新的 release 了,创建release分支使用版本号命名!

bogon:helloworld baxi$ git flow release start 1.0
Switched to a new branch 'release/1.0'

Summary of actions:
- A new branch 'release/1.0' was created, based on 'dev'
- You are now on branch 'release/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 '1.0'

完成 release 执行 git flow release finish '1.0'

填写提交merge 信息 以及为标签写一条信息

bogon:helloworld baxi$ git flow release finish '1.0'
Switched to branch 'master'
Your branch is up to date with 'origin/master'.
Auto-merging src/components/common/com-filter-panel.vue
Merge made by the 'recursive' strategy.
 src/components/common/com-filter-panel.vue | 1 -
 1 file changed, 1 deletion(-)
Deleted branch release/1.0 (was 495fcd8).

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

相关文章

  • git-flow 初探

    安装git-flow 请自行搜索 -$ git flow init git-flow 模式会预设两个主分支在仓库中...

  • git-flow

    git-flow git-flow 应该是目前流传最广的 Git 分支管理实践。git-flow 围绕的核心概念是...

  • Git 分支管理 git-flow

    git-flow git-flow 应该是目前流传最广的 Git 分支管理实践。git-flow 围绕的核心概念是...

  • git分支规范

    分支管理参考git-flow(git-flow介绍)的工作流程,但不使用git-flow。所有的分支的操作都需要手...

  • 一周学习精选(2018-10-27)

    使用 git-flow 管理分支 Using git-flow to automate your git bran...

  • Git 管理工具 Tower 的使用

    创建 git flow 点击 Git-Flow -> Enable Git-Flow 按钮 点击 configur...

  • Git流程工具 git-flow 使用心得

    git-flow这个工具非常工具,官网地址 一.下载git-flow mac下使用 brew install gi...

  • git-flow使用指南

    git-flow使用指南 1.简介 git-flow是基于Git Flow工作流模型的工具,了解Git Flow ...

  • 2021-10-14

    什么是 Git-flow? 简单的说,Git-flow 就是利用 Git 分支能力的开发策略之一。 可以采用 Gi...

  • Git-flow Study Note

    一、设置git-flow 二、git-flow 的模式 三、创建新的分支,用于开发新的功能 四、完成了一个功能后,...

网友评论

      本文标题:git-flow 初探

      本文链接:https://www.haomeiwen.com/subject/dkldoctx.html