Git Product home page Git Product logo

gif's People

Watchers

James Cloos avatar emon avatar

gif's Issues

项目设计文档:GitFlower

项目设计文档:GitFlower

一、项目介绍

1.1 项目背景

git-flower 按照相关规则,尽量规范团队内常用的git操作,避免误操作,提高git使用能力及效率。

操作基于Git Bash,整合git基础命令,降低git bash操作的学习使用门槛

1.2 项目特色

  • 团队gitflow规则配置化
  • 可自定义函数hook
  • 极大程度兼容原生git操作集

二、项目详情

2.0 团队GitFlow配置文件

gitFlow.config 中以 json格式记录团队相关配置项的值

featureBranchPrefix : 特性分支的前缀规范(如:"feat-{date(YYMMDD)}-",函数表见附录)
featureBranchSufix : 特性分支的后缀规范(如:"-{arthor()}")

2.1 Git Clone

这里暂不明确,预留

2.2 初始化gitFlow (gif init newBranch [oriBranch])

使用方法:
```
gitflow(gif) init featureName [commitId/branch/tag]
```
默认从主分支拉取,加上数据源参数可以从特定commit拉取新的分支作为特性分支

实际执行的命令集:

```
git checkout master(commitId/branch/tag)
git pull
git checkout -b featureBranchPrefix.featureName.featureBranchSufix
git push -u origin featureBranchPrefix.featureName.featureBranchSufix
```

操作结果,从主分支(或指定分支)拉取最新代码创建特性分支:feat-20180227-featureName-wentsk,并建立远程分支

2.3 切换分支 (gif co/cof branch)

使用方法:
```
1) gif co fullBranchName  //同git checkout fullBranchName ,需要使用分支全名
2) gif cof branchName  //f后缀为特性分支标记,此时branchName应用配置的前后缀,忽略date()等时效性函数进行匹配
```

2.4 查看分支 (gif bh/bha)

使用方法:
```
1) gif co fullBranchName  //同git checkout fullBranchName ,需要使用分支全名
2) gif cof branchName  //f后缀为特性分支标记,此时branchName应用配置的前后缀,忽略date()等时效性函数进行匹配
```

附录一:函数集 GFCF (Git Flow Config Function)

e1.1 date(Formatter) 获取当前时间

Formatter: YYMMDD
           yyyy-mm-dd
           ......

e1.2 arthor() 获取操作者id

e1.2 arthor() 获取操作者id

e1.2 arthor() 获取操作者id

e1.2 arthor() 获取操作者id

e1.2 arthor() 获取操作者id

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.