2017-06-21 82 views
0

这里是我的情况如何在远程主服务器更改后从主服务器更新我的功能分支?

只是拉从远程主的变化,但是,我怎样才能使我的特性分支工作副本更新如新在sourcetree主我有分公司之前创建的?

+1

'$ git checkout yourFeatureBranch && git merge master'就是你要找的东西。在SourceTree中必须有一个“合并”功能才能做到这一点,并且你想把'master'合并到'yourFefatureBranch'。 – Kleskowy

回答

0

两种方式来解决这个问题。

方法1

即由@Kleskowy提到,合并最新掌握到你的特性分支。

方法2

如果主机有很大的变化,那么你可以这样做,

git checkout master 
git merge feature_branch 
solve your conflicts at master branch 

方法1和方法2都没有很大的区别,你可以做到这一点无论哪种方式。

注意:与主合并将创建额外的一个提交。

方法3

如果你想变得更加快乐,那就去做rebase。

git checkout your_feature_branch 
git rebase master 
git checkout master 
git merge your_feature_branch //If you have conflicts solve it. 
git push origin master 
相关问题