通过github web界面传播主更改到功能分支



我一直是SVN用户很长一段时间,并使用Github主要使用叉拉模型。所以现在已经切换到功能分支模型,我正试图将更改从主分支(某些更改)传播到功能分支。现在通过命令行执行的方法是

)。变基

git checkout feature-branch
git rebase master

b.) checkout feature branch and merge master

git checkout feature-branch
git merge origin/master

但我正试图通过github在线做到这一点。那么

 1.) Create a pull request with base branch - Feature branch and 
compare branch - Master and commit
 2.) And then merge feature branch into the master with another pull request. 

本质上这与通过命令行执行上述两种方法中的任何一种相同吗?

是的,拉请求合并的工作方式类似于命令行合并。git checkout feature然后git merge origin/master将master合并到那个特征中。

如果你创建了一个导致冲突的拉取请求,GitHub会告诉你将它与命令行合并。如果分支可以自动合并,则与通过命令行进行合并是一样的。

如果你想了解更多关于mergerebase的不同之处,我可以推荐这篇我认为非常好的文章

最新更新