在Windows上的安装git-flow和使用git-flow

一、github地址

https://github.com/nvie/gitflow/

二、安装

windows 下安装参考 https://github.com/nvie/gitflow/wiki/Windows

我安装过程:

参考:Git for Windows (previously MSysGit)
https://github.com/nvie/gitflow/wiki/Windows#git-for-windows-previously-msysgit


环境: window10: 版次: window10 家庭中文版 版本:
1709 OS内部版本: 16299.431

git: git version 2.15.0.windows.1

2、1 复制getopt.exelibintl3.dlllibiconv2.dll 到git 的安装目录下的bin目录下

按照官方给出的安装方法:

Download and install getopt.exe from the util-linux package into
C:\Program Files\Git\bin. (Only getopt.exe, the others util-linux
files are not used). Also install libintl3.dll and libiconv2.dll from
the Dependencies packages (libintl and libiconv), into the same
directory.

依次点击三个链接,把getopt.exelibintl3.dlllibiconv2.dll 三个东西下载复制到git 的安装目录下的bin目录下
我的是D:\OpenSource\Git\bin,其中D:\OpenSource\Git是git 的安装目录

注意,三个要下载的都是Binaries
的zip格式文件,下载完后只需要把各自bin目录下的对应文件复制到git安装目录的bin目录下即可,其他的都不需要(比如,对于getopt.exe来说,打开util-linux-ng-2.14.1-bin.zip\bin,复制getopt.exe到D:\OpenSource\Git\bin目录下,版本和路径根据自己的情况而定)

2、2 Clone the git-flow sources from GitHub

打开Git Bash 执行:

$ git config --global url."https://github".insteadOf git://github

如果不执行这条命令,直接执行下面命令的话,clone 会出现卡住现象

$ git clone --recursive git://github.com/nvie/gitflow.git

上面命令在那个目录下执行就把gitflow下载到那里

打开powershell(以管理员身份运行), cd 到下载gitflow 的目录下

PS E:\安装包\git-flow\gitflow> .\contrib\msysgit-install.cmd "D:\OpenSource\Git"

D:\OpenSource\Git 根据安装git的安装目录进行调整

测试是否安装成功
打开Git Bash

$ git flow help
usage: git flow <subcommand>

Available subcommands are:
   init      Initialize a new git repo with support for the branching model.
   feature   Manage your feature branches.
   bugfix    Manage your bugfix branches.
   release   Manage your release branches.
   hotfix    Manage your hotfix branches.
   support   Manage your support branches.
   version   Shows version information.
   config    Manage your git-flow configuration.
   log       Show log deviating from base branch.

Try 'git flow <subcommand> help' for details.

三、使用git-flow

参考:https://github.com/nvie/gitflow/

初始化

git flow init [-d]

-d 参数表示接受所有默认值

Creating feature/release/hotfix/support branches

  • To list/start/finish feature branches, use:
  git flow feature
  git flow feature start <name> [<base>]
  git flow feature finish <name>

For feature branches, the arg must be a commit on develop.

  • To push/pull a feature branch to the remote repository, use:
git flow feature publish <name>
git flow feature pull <remote> <name>
  • To list/start/finish release branches, use:
git flow release
git flow release start <release> [<base>]
git flow release finish <release>

release写法,比如:1.0.0
For release branches, the arg must be a commit on develop.

  • To list/start/finish hotfix branches, use:
  git flow hotfix
  git flow hotfix start <release> [<base>]
  git flow hotfix finish <release>

For hotfix branches, the arg must be a commit on master.

  • To list/start support branches, use:
  git flow support
  git flow support start <release> <base>

For support branches, the arg must be a commit on master.

四、Git Flow 的介绍

参考 Vincent Driessen 发表的博客:
http://nvie.com/posts/a-successful-git-branching-model/

阅读更多
版权声明:本文为博主原创文章,转载时请注明出处 https://blog.csdn.net/seek_of/article/details/80320065
文章标签: git flow git
个人分类: git
上一篇axios post 跨域请求
下一篇java Spring MVC 实现 SSE (Server-Sent Event) 服务器发送事件
想对作者说点什么? 我来说一句

没有更多推荐了,返回首页

关闭
关闭
关闭