本文目标:
用一个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。