Eclipse上GIT插件EGIT使用手册之十一_Fetch和Rebase
jopen
13年前
<p>MairoBro来做fetch和rebase的测试,首先Mairo弟弟在client中添加文件OPQ分别提交,并push到服务器,如图:</p> <p><img alt="Eclipse上GIT插件EGIT使用手册之十一_Fetch和Rebase " src="https://simg.open-open.com/show/3850fa9be74f1b0feec102de05721bdb.png" width="210" height="141" /><img alt="Eclipse上GIT插件EGIT使用手册之十一_Fetch和Rebase " src="https://simg.open-open.com/show/91c2a532de28890283ace73f2c2bb135.png" width="199" height="102" /></p> <p>此时服务器端的历史已经被更新,但是Mairo哥哥的remote tracking中mirror分支并没有更新到最新的记录,如图:</p> <p><img alt="Eclipse上GIT插件EGIT使用手册之十一_Fetch和Rebase " src="https://simg.open-open.com/show/53eec8833a83a29c6f730f6d38e727f0.png" width="540" height="234" /></p> <p>所以需要更新remote tracking中的分支,使得它与服务器端的分支同步,右键点击资源库选择Fetch</p> <p><img alt="Eclipse上GIT插件EGIT使用手册之十一_Fetch和Rebase " src="https://simg.open-open.com/show/1d85dc1aa53736435baea14ade382502.png" width="238" height="167" /></p> <p><img alt="Eclipse上GIT插件EGIT使用手册之十一_Fetch和Rebase " src="https://simg.open-open.com/show/c88cb0c4a29a19e6464d3d99a41c372e.png" width="608" height="439" /></p> <p>这样就更新了本地的remote tracking中的分支,使得它和服务器端分支同步。</p> <p><img alt="Eclipse上GIT插件EGIT使用手册之十一_Fetch和Rebase " src="https://simg.open-open.com/show/2da88333f1ccd751e9b8209d8c91fd40.png" width="433" height="202" /></p> <p>然后Mairo哥哥在本地的private中添加文件ABC,并分别提交到本地仓库中。</p> <p><img alt="Eclipse上GIT插件EGIT使用手册之十一_Fetch和Rebase " src="https://simg.open-open.com/show/1d34d896c5e972690498bb2b60e10f48.png" width="234" height="123" /><img alt="Eclipse上GIT插件EGIT使用手册之十一_Fetch和Rebase " src="https://simg.open-open.com/show/ad07f1070b57339613574a1baef3f544.png" width="232" height="98" /></p> <p>然后将本地mirror分支和remote tracking中的mirror分支进行rebase,先checkout本地mirror分支 ,然后右键点击选择Rebase</p> <p><img alt="Eclipse上GIT插件EGIT使用手册之十一_Fetch和Rebase " src="https://simg.open-open.com/show/e5f19e4300635ee24e201b77c23f7f60.png" width="357" height="204" /></p> <p><img alt="Eclipse上GIT插件EGIT使用手册之十一_Fetch和Rebase " src="https://simg.open-open.com/show/4a1d13b259984754a848c1b5fc4fe96c.png" width="530" height="461" /></p> <p><img alt="Eclipse上GIT插件EGIT使用手册之十一_Fetch和Rebase " src="https://simg.open-open.com/show/a71e2595acba6844a9a89d0e25b33025.png" width="524" height="148" /></p> <p><img alt="Eclipse上GIT插件EGIT使用手册之十一_Fetch和Rebase " src="https://simg.open-open.com/show/45b050bd93c26e1770c6bbdda8425e9e.png" width="368" height="221" /></p> <p>如上图可以看到历史记录的顺序是OPQABC,已经rebase成功,接着push到服务器即可。</p>