git工作流

GitFlow

始终保持有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查看分支:

GitFlow

相关文章:

  • 2021-11-05
  • 2021-12-14
  • 2021-07-16
  • 2022-12-23
  • 2021-08-29
  • 2021-04-13
猜你喜欢
  • 2021-11-21
  • 2021-08-06
  • 2023-01-04
  • 2021-10-05
  • 2021-06-23
  • 2022-01-19
相关资源
相似解决方案