如何拉叉,从上游合并更改然后再推回到fork?

时间:2015-08-28 22:23:27

标签: git github merge

我意识到这是一个相当文明的过程,但我似乎继续打个嗝。我想拉一个分叉项目(jenkinsci / pluginname),然后从上游(公司/插件名)合并更改。 jenkins / pluginname项目是我们公司/ pluginname的一个分支。从这里我想合并上游/主机到原点/主机,然后推送到原点。但是,当我这样做的时候,我所得到的只是git告诉我一切都是最新的。

以下是我的工作:

git clone https://github.com/jenkinsci/pluginname.git
cd pluginname
git add remote upstream https://github.com/company/pluginname.git
git fetch upstream
git checkout master
git merge upstream/master

从这里,我得到了#34;已经是最新的。"假设合并有效,我接下来要做的是:

git push origin master

我在这里缺少什么?

更新(已解决)

事实证明,我看到的差异是从原点/主站到上游/主站,而不是上游/主站到源/主站。一旦我将新的更改推送到上游/主服务器,合并就会成功运行。谢谢!

1 个答案:

答案 0 :(得分:0)

我也不知道你可能会遗漏什么,对我来说看起来很好。 希望其他人可以提供帮助,但以防万一,也许:

  1. origin / master和upstream / master之间确实没有区别吗?
  2. 尝试执行<!doctype html> <html> <head> <title></title> </head> <style> body { background-color: white; color: black; margin: 0; padding: 0; } .overlayIt { color: red; text-decoration: none; } .overlayIt:HOVER { color: black; } #frameIt { display: none; position: relative; z-index: 101; width: 0px; height: 0px; color: black; overflow: hidden; opacity: 1; border: 1px solid white; background-color: #000; color: white; text-align: center; margin-top: -65px; margin-left: auto; margin-right: auto; } #pageOverLay { position: absolute; top: 0; left: 0; z-index: -1; height: 1000px; width: 100%; background-color: black; opacity: 0; } </style> <body> <A href="bullets.jpg" class="overlayIt">CLICK</a><br/> <A href="blah.jpg" class="overlayIt">CLICK</a> <P/><P/><P/> THIS IS SOME TEXT THIS IS SOME TEXT THIS IS SOME TEXT THIS IS SOME TEXT THIS IS SOME TEXT THIS IS SOME TEXT<br> THIS IS SOME TEXT THIS IS SOME TEXT THIS IS SOME TEXT THIS IS SOME TEXT THIS IS SOME TEXT THIS IS SOME TEXT<br> THIS IS SOME TEXT THIS IS SOME TEXT THIS IS SOME TEXT THIS IS SOME TEXT THIS IS SOME TEXT THIS IS SOME TEXT<br> THIS IS SOME TEXT THIS IS SOME TEXT THIS IS SOME TEXT THIS IS SOME TEXT THIS IS SOME TEXT THIS IS SOME TEXT<br> <div id="pageOverLay"> </div> <img id="frameIt"> <script src="https://ajax.googleapis.com/ajax/libs/jquery/2.1.3/jquery.min.js"></script> <script> var link; var overlayToggle = false; function openOverlay() { $('#frameIt').attr('src',link); $('#pageOverLay').css('z-index','100').animate({opacity: 0.8}, 500, function() { $('#frameIt').css('display','block').animate({height: 500}, 300, function() { $('#frameIt').animate({width: 500}, 500); }); }); overlayToggle = true; }; function closeOverlay() { $('#pageOverLay').animate({opacity: 0.0}, 500, function() { $('#frameIt').animate({width: 0}, 300, function() { $('#pageOverLay').css('z-index','-1');$('#frameIt').css('display','none').css('height','0'); }); }); overlayToggle = false; }; $(function() { $('.overlayIt').on('click',function(e) { e.preventDefault(); link = $(this).attr('href'); openOverlay(); }); $('#frameIt').on('click',function() { closeOverlay(); }); $(document).keyup(function(e) { if(e.keyCode == 27 && overlayToggle) closeOverlay(); }); }); </script> </body> </html> 只是为了确认您的本地主人是否正在跟踪来源