文章内容
2017/5/5 11:29:31,作 者: 黄兵
git合并分支
在自己的当前分支已经向github提交,之后要合并分支。操作方法如下:
git merge —— 合并分支
我们已经将feature-A 已经实现完毕,想要将他合并到主干分支master中。首先我们要切换到master分支。
D:\My Documents\Visual Studio 2013\Projects\new.8677333.com>git checkout master M new.8677333.com/Web.config Switched to branch 'master'
然后合并feature-A分支。为了在历史记录中明确记录下本次分支合并,然后我们创建合并提交。因此,在合并时加上 --no-ff 参数。
D:\My Documents\Visual Studio 2013\Projects\new.8677333.com>git merge --no-ff fe ature-A Merge made by the 'recursive' strategy.
这样一来,feature-A分支的内容就合并到master分支中了。
评论列表