为Vincent Driessen的分支模型提供高级存储库操作的Git扩展。
nu-gitflow的Python项目详细描述
纯python实现git扩展以提供高级 文森特·德里森的存储库操作 branching model。
开始
有关git flow入门的最佳介绍,请阅读 Jeff Kreeftmeijer的博客文章http://jeffkreeftmeijer.com/2010/why-arent-you-using-git-flow。
或者看看其中一个屏幕广播:
- How to use a scalable Git branching model called git-flow (通过构建模块)
- A short introduction to git-flow (作者马克·德里科特)
- On the path with git-flow (作者Dave Bock)
安装Git流
您可以使用:
安装git-flow。pip install nu-gitflow
git-flow需要python>;=2.7或python>;=3.4。
与您的外壳集成
对于那些使用Bash或 ZSH壳牌,请查看优秀作品 上 git-flow-completion 项目由bobthecow。它提供 所有git流子命令和分支名称的制表符完成。
请帮忙
这个项目还在开发中。反馈和建议是 非常欢迎,我鼓励您使用github上的Issues list来提供 反馈。
您可以自由地分叉此回购协议并提交您的附加内容。一份清单 在所有贡献者中,请参见文件authors.txt。
您需要unittest2来运行测试。
许可条款
Git流是根据BSD许可证的自由条款发布的,请参见 文件license.txt。尽管bsd许可证没有 要求您共享对源代码所做的任何修改, 我们非常鼓励并邀请您为您的 对社区(最好是在github fork中)的修改 当然。
Git流用法
初始化
要使用基本分支结构初始化新回购,请使用:
git flow init [-d]
这将交互式地提示您一些问题 您希望用作开发和生产分支的分支, 以及您希望如何命名前缀。你只需按一下 回答任何问题以接受(正常)违约 建议。
-d标志将接受所有默认值。
创建功能/发布/热修复/支持分支
要列出/开始/完成功能分支,请使用:
git flow feature git flow feature start <name> [<base>] git flow feature finish <name>
对于功能分支,<base>arg必须是对develop的提交。
要将功能分支推/拉到远程存储库,请使用:
git flow feature publish <name> git flow feature pull <remote> <name>
要列出/开始/完成发布分支,请使用:
git flow release git flow release start <release> [<base>] git flow release finish <release>
对于释放分支,<base>arg必须是对develop的提交。
要列出/启动/完成修补程序分支,请使用:
git flow hotfix git flow hotfix start <release> [<base>] git flow hotfix finish <release>
对于热修复分支,<base>arg必须是对master的提交。
要列出/启动支持分支,请使用:
git flow support git flow support start <release> <base>
对于支持分支,<base>arg必须是对master的提交。
项目历史
Gitflow最初是由Vincent Driessen开发的 外壳脚本。2007年,他开始重写python,但没有 完成它。2012年2月,Hartmut Goebel开始完成 python重写并要求文森特撤销更改。但在2012年6月 文森特关闭了请求并删除了他的python-rewrite 分支所以hartmut决定自己发布python重写。
2015年,Hartmuts Gitflow被抛弃,而Python3 缺少支持。所以克里斯蒂安·阿辛决定放弃他的版本 并将其作为新的基于python的gitflow替代方案发布。