本文目标:
用一个Git repository管理多个分支,发布多个版本,这些版本之间主逻辑一至,功能外观有细微差别。
命令如下:
New a branch:
$git checkout HEAD -b newBranch
Push to remote:
$git push origin newBranch
Pull from remote:
$git pull origin master
Remove remote branch:
$git push origin :newBranch
This command will find a branch called newBranch and then delete it.
这样我们可以把主要代码放在主分支,并新建分支(feature-branch),实现一些小范围的特定的功能,merge原则:只可以把master合并到newBranch,修改主要特性时在master上做,然后合并到feature-branch。
本文介绍如何使用Git仓库管理多个分支,实现版本发布。通过创建新分支、推送远程、拉取远程更新及删除远程分支的操作,实现主分支与特色功能分支的分离管理。强调了主分支用于维护核心功能,特色分支则用于特定功能开发和测试,最后通过合并原则确保代码的一致性和稳定性。
1195

被折叠的 条评论
为什么被折叠?



