GitFlow

git工作流

始终保持有master分支(只要有目录,git就自动创建)和develop分支(手动创建)

一、主分支Master
二、开发分支Develop
三、临时性分支(最后发布要删除的)
* 功能(feature)分支
* 预发布(release)分支
* 修补bug(fixbug)分支
四、 功能分支

// 创建develop分支
git checkout -b develop master

// 切换到master分支
git checkout master

// 对develop分支进行合并,--no-ff是从master生成一个节点,便于查看
git merge --no-ff develop

// 创建一个功能分支
git checkout -b feature-x develop

// 开发完成后,将功能合并到develop分支
git checkout develop
git merge --no-ff feature-x

// 删除test分支
git branch -d test

GUI查看分支:

原文地址:https://www.cnblogs.com/lqcdsns/p/6233740.html