注册 登录  
 加关注
   显示下一条  |  关闭
温馨提示!由于新浪微博认证机制调整,您的新浪微博帐号绑定已过期,请重新绑定!立即重新绑定新浪微博》  |  关闭

民主与科学

独立之人格,自由之思想

 
 
 

日志

 
 

Git fetch和git pull的区别  

2012-04-30 21:29:13|  分类: 版本控制 |  标签: |举报 |字号 订阅

  下载LOFTER 我的照片书  |
原文: http://www.tech126.com/git-fetch-pull/ 
Git中从远程的分支获取最新的版本到本地有这样2个命令:
1. git fetch:相当于是从远程获取最新版本到本地,不会自动merge

    
git fetch origin master
git log -p master..origin/master
git merge origin/master

    以上命令祷span" id="$_blog_subscribe">订阅8008106誧k dot">·nof4/font>1. 订阅·ebkit-auto;" >


git fetch origin master订阅ebkit-auto;" >

uchet 9px; text-ala rel="nofollow" huchet MS'be">nof4line-he地,不会自动merge
uchet 9px; text-ala rel="nofollow" huchet, Tahoma, Arial; font-s:tmpbe">nof4line-heze:', Tahoma, Ari333333ucheflbl="div class="bct fc05 fc11 nbw-ucheag"> uchet 9px; text-ala rel="nofollow" huchet, Taycofh cpg -p mbe">nof4line-heze:', Tahoma, Ari333333ucheflbl="div class="bct fc05 fc11 nbw-ucheag"> uchet 9px; text-ala rel="nofollow" huchet, Tap;&nbstmpbe">nof4line-he>
git fetch origin master
git la">订阅订詔-auto;" >nof4/font>1. 订阅< 之后再进行比较合 ebkit-auto;" >

1. nof4e="text-align: -合嗟庇谑谴釉冻袒袢∽钚掳姹镜奖, Tahoma, Ari333333ucheflbl="div class="bct fc05 fc11 nbw-ucheag"> uchet 9px; text-ala rel="nofollow" huchet MS'be">nof4line-he地,不会自动mergeGit中从远程的分支获取最新的版本到本地有这样2个命令:

git fetch origin mastergit fetch

ebkit-auto;" >

" >中er.com/a略豅OFTER " >中er.com/a略 inkTopDieeeeeespal" ta" >中 g p/span>

       
 
略豅OFTER<08eeeel $_blo合嗟

将文誼; 禸dc脚笥3102l="4> 略豅OFeeeeeeeeeeeelinpun> efoden" namb cnb-rdId" valub c 7008605targe2ss="tt00670806507680670800830680680800306lass //略豅OFTER efoden" namb cfroe撩valub cfocuPOST //略豅OFTER efoden" namb c我<照片书"noa> "" targ"iv>

"" 83%A8iv>
</ass="" tnbsp;<a> ss=""lt;9px; "r nb "webkit-auto;" >

http://www.tech126.com/git-fetch-pu<r9px;ss=""lt;zeo;" >"webkit-auto;" >

gi<r9px;ss=""lt;zeo;" >"webkit-auto;" >

&n<brss=", Tap;&nbsk dot">·

"webkit-auto;" >

8008106誧k dot">·"webkit-auto;" >

原文: ·"webkit-auto;" >

原文: "webkit-auto;" >

原文: "2"" 8ss=""lt;9px; "r nb "a rel="nofol c.16"" 8ss=""lt;brss="<r9px;ss=""lt;line-ss=""lt;地,不会自"痬erge "2"" 8ss=""lt;9px; "r nb "a rel="nofol c.16"" 8ss=", Tahoma, Arial; font-s:tmp<r9px;ss=""lt;line-ss=""lt;brss="<, Tahoma, A"i333333"" 8flbl="div class="bct fc05 fc11 nbw-"" 8ag"> "2"" 8ss=""lt;9px; "r nb "a rel="nofol c.16"" 8ss=", Taycofh cpgpx;;nbsp;<r9px;ss=""lt;line-ss=""lt;brss="<, Tahoma, A"i333333"" 8flbl="div class="bct fc05 fc11 nbw-"" 8ag"> "2"" 8ss=""lt;9px; "r nb "a rel="nofol c.16"" 8ss=", Tap;&nbstmp<r9px;ss=""lt;line-ss=""lt;/pss=""lt;olcoss=""lt;9px; "r nb "webkit-auto;" >

"webkit-auto;" >

"webkit-auto;" >

原文:

"2"" 8ss=""lt;9px; "r nb "a rel="nofol c.16"" 8ss=""lt;brss="<r9px;ss=""lt;line-ss="<地,不会自"痬erge

gi<r9px;ss=""lt;zeo;" >"webkit-auto;" >

"webkit-auto;" >

原文: gi前,我们可以查看更新情况,然后再决定是否合 <r9px;ss=";<ra> ss=""lt;a> ss="结束<brss="<brss="<wzess=""lt;ra> ss=" //略豅OFTER efoden" namb cwtrans撩valub cons">  efoden" namb cwtransUrl撩valub cottp://ons"> 

 eeeel&w=100&h=100&act=qbl" target="_ 93" toperc0 th)f93" toperc0 th)-ode> 略豅OFeeeeeeeeeel9px; "r nb class="itm noTy不会自秄-myLikeI <<9px;Likeus=不秂r9px;>略span><9px;Re"ttloul">ont-si9px;/略span> 人er9px;>l9px; 不会自禼ribe n class="stag"> p;&nbsl9px; 不会自禼ribe n class="stag"> p;&nbsl9px; 不会自秚le=">er9px;>3 m2a" 略span>略豅OFTER<9px;Ctlbht ="t9px;/略eeeeeeeeeeeel&w=100&h=100&act=l&w=100&h=100&acl&w=100&h=100&l&w=100&h=100&la> 换嶙远snl> 略豅OFeeeel" ta"r nb class="itm noTy不会自秓m/bl(
Re"ttloulCospb b:i baeeeeeeeel" taclasyoda thm qqzone clas mfo
59ad"> itlone;" target="_bla
$_etion:n:s=span>l&w=100&span>s=span>la> /略span> :efoden;mas=span> 12px;col"r nb cmax-:12pxb78e" w妹 >:0" heig0" he5" ws="ibloctx;c clasmore"tspb b_ "one;">八itl%d"> 12s dv" class="m-kaolaadv">
"> lofteriframe"> re"ttloulbx; ?em0 bds0">关于我@ bo "$_etion:n:s=span>in 蟬pan>l&w=100&span>l" taclas < l" ta"r nb c="nofol4e" wa rel="nofol4e" w妹 >:05" tht=5" th; 1" tsolid #d5d5d5;backgrou d:ialffe1w合嗟庇谑谴 pre;eeeel9px; "r nb sfloat:93" t;="nofol2e" wa rel="nofol2e" width="240" he16pxt0" hei;webkit#d7854e;cursor:pospaerwla关闭"t9px;/略span> "r nb cidth="2gt;o 订阅订阅订詌> "r nb cwebkit#d7854e;合嗟眃e"trc0

eel> namb ctx; Cttlb b clastx; Cttlb b $_eoul"span>我的照片书\nk"a> \ lank"\re(documloft
\ \div>
<\/g -p mba> \de style="col\"webkit-auto;" >
原文: http://www.tech126.com/git-fetch-pu"t9px;\dezeo;"   >\"webkit-auto;"   >
原文: 
原文: 原文: &ntRe"ttBx; ;false,略豅OFTER<08eeeeattachlb bsFileIds:[],略豅OFTER<08eeeevote:{},略豅OFTER<08eeeegroupks_0:{},略豅OFTER<08eeeefrioul class:' 
   class:'unFt="ow',略豅OFTER<08eeee定蠸ucc:'',略豅OFTER<08eeeevisitorProvince:'',略豅OFTER<08eeeevisitorCtly:'',略豅OFTER<08eeeevisitorNewUser;false,略豅OFTER<08eeee禸dcAddks_0:{},略豅OFTER<08eeeemse:'   ',略豅OFTER<08eeeem"ts:'',略豅OFTER<08eeeesrk:-itl,略豅OFTER<08eeeeremindgoodn
   tx; ;false,略豅OFTER<08eeeeisBlackVisitor;false,略豅OFTER<08eeeeisS="bYoda Ad:true,略豅OFTER<08eeeehbdcI bdo:'',略豅OFTER<08eeeehm"ts:'1',略豅OFTER<08eeeenhefRe"ttBx; Cou  :' ',略豅OFTER<08eeee   
     56ad""r nb cover">:efoden;m  title="分享lofteriframe">
m艵 bdc qqwtx; a ma&tx; one;" tBorder="bdc0 tion:n:'略豅OFTER<08ee}略豅
略豅OF{lidc a as x}略豅  {if !!x}略豅  l" target="_n class   
onts noul撩 tx; 讯微博" c${x.visitorNamb}/d/略豅eeee{if x.visitorNamb==visitor.userNamb}略豅OFTEy altass{x.visitorNicknamb|escape}"
noul "$_撩
noul "$_撩
noul "$_撩 tx; 讯微博" cservices/ 不会自秓nts >大< tx; 讯微博" c${x.visitorNamb}/d/略豅eeeeeeee${fn(x.visitorNicknamb,8)|escape}略豅OFTE豅 ${fn1(a.userNamb)}"// 大< ;| tx; 讯微博" c${a.userNamb}/d/${fn(a.nicknamb,8)|escape} 不会自秙par we${a.nhefI bdo|escape}{if gbeat260}${sucrilb b}{eti}l&w=100&span>la> 不会自兜轿s"版本控&w=100&spal" target="_mbga om/bl(嗟e /略豅OFTE豅
不会自秏bgai /略豅OFTER
onts 嗟e >大< lank" hidefocus="true" >/ /略豅OF{eti}略豅8日志,群博日志--/略豅<合嗟ebea namb cjvb撩clasm-3-jst-3"$略豅OF{lidc a as x}略豅 {if !!x}略豅 lli 不会自秐b-oc/l> 大< ;|${feib()}${x.permttpnk}/?蔯0 stBx; o/${fn(x. 略豅OFeeeela> /略豅OF {lidc a as x}略豅 {if !!x}略豅 pal" target="_n class
onts noul撩 tx; 讯微博" c${x.re"ttloulerNamb}/d/略豅eeeepal altass{x.re"ttloulerNicknamb|escape}" tx; 讯微博" c${x.re"ttloulerNamb}/d/略豅eeeeeeeeee${fn(x.re"ttloulerNicknamb,6)|escape}略豅OFTE豅pal/oul" targepal/a> /略豅OFpal/a> /略豅OF {eti}略豅 {/lidc}略豅pal/a> /略豅OF{if !!b&&b.length>0}略豅 lp 不会自秓ntm y他们还ont-了asteg" >eeeelul$略豅OF{lidc b as y}略豅 豅{if !!y}略豅 豅palli 不会自秗rbd/<9px; 不会自秐 clas<9px;/ >
onts >大< =记录aster
>eeeelul 不会自秚thc"$略豅OF{lidc d as x}略豅 palli 不会自秔"> s=略豅OFTE豅<9px; 不会自禼ribe n clas<9px;/略豅OFTE豅
不会自 tx nb-oc cribed/<9px;>l> 大< lank" ${x.referBx; Url}o/${x.referBx; ss="f|escape} /略豅OF pala> 不会自 tr cribed/<9px;>l> 大< lank" ${x.referHomeP="l}o/${x.referUserNamb|escape} /略豅OF 大< ;|iv> tx; 讯微博" c${x.userNamb}/${x.permttpnk}/?re"ttloulBx; o>大< ;|iv> tx; 讯微博" c${x.userNamb}/${x.permttpnk}/?personalRe"ttBx; o>略豅OF{lidc a as x}略豅 {if !!x}略豅 lli 不会自秐b-oc/l> 大< 4}{bbeak}{eti}略豅OFTE{if !!x}略豅 eeeelli 不会自秐b-oclontsTd略豅OFTEeeeel>
>大< tx; 讯微博" c${x.userNamb}/${x.permttpnk|default:""}" 略豅OF{lidc a as x}略豅 {if !!x}略豅 lli 不会自秐b-oc/l> 大< ;|${feib()}${x.permttpnk}/o/${fn(x. 不会自禼ribe nb-oc/l> 不会自>大< lank" iv> ons">  ${tx; Det.地x; Permttpnk}/d/${tx; Det.地x; Titbi|escape} /略豅OF {/ti}略豅 {if !!(tx; Det.n相礏x; Permttpnk)}略豅 豅el9px; 不会自秈rge 不会自禼93" t nb-oc/l>
>大< ;| ons">  ${tx; Det.n相礏x; Permttpnk}/d/${tx; Det.n相礏x; Titbi|escape} /略豅OF {/ti}略豅 不会自秇o
onts noul撩 tx; 讯微博" c${x.定新纒herUsernamb}/d/略豅eeee{if x.定新纒herUsernamb==visitor.userNamb}略豅OFTEy altass{x.定新纒herNicknamb|escape}" tx; 讯微博" c${x.定新纒herUsernamb}/d/略豅eeeeeeee${fn(x.定新纒herNicknamb,8)|escape}略豅OFTE豅
f-myLikeI < tx; 讯微博" c${x.定新纒herUsernamb}/d/g -p mbeoul" tarl/a> /略豅OF{/ti}略豅 {/lidc}略豅 略豅OFeeeeeeeela> 不会自秚tlth)font6 id=b"fc03"fcsad/styl新闻l/a> /略豅OFeeeeeeeela> 不会自秓desl b>略豅OFeeeeeeeeeeeel>
headodes lfocus="true">(heada res. arc,240,150,true)}">略 中<9px;/ e9px;/略 0}略豅 7}{bbeak}{eti}略中 lfocus="true"> loft bo /odesapp/d/-, Astyl新闻客户端83%A8 /略豅OFeeeeeeeel/a> /略豅 不会自秛is_0"版本控&w=100&8日志="f4/略 不会自秏oren$_> 大< ;| tx; 讯微博" ">n clss=""s="> /略 clasyoda th_)- o;" >s="ibloc clas /略豅OFla> clascx; PublicAccou /略豅 略豅OFla> 不会自抖ㄐ吕sh"版本控&w=100& 不会自秈d=t"fcs2"fc03"; 不会自(ima bd=t"fcs2"fc03>略豅OFeela> 不会自禼asen$_ea> /略豅OFeela> 不会自秔"> s=_ea> /略豅OF_ea> /略豅 不会自禼losen$略豅OFTEel9px; 不会自(ima n class="st ="st-5=">g -p mbe9px;/略 /略 ela> 不会自(ima ; /略豅 cx; t bo /${x.userNamb}/撩大lontsTd${x.nickNamb|escape}g -p mg -p mg -p mg -p m${fn1(x.voteTime)}"t9px;/略eeeeeeee{if x.userNamb==''}{eti}略豅OF{/ti}略豅 {/lidc}略豅 /略 p/span> p)- cx; t bo /到 >略豅OF/a/a{lidc x.l as y}略豅 豅pal>
itm noul撩lank" hidlfocus="true"> >略 p/span>
  apispan> cap/captcha.jpgx?px>&ntI ma71040$_s&r=';略豅 b.bst.126.net/odep="l nb/mbox/';略豅 osspan> mon/ava.nwhbdc=';略豅 osspan> mon/ava.nwhbdc=';略豅 osspan> mon/ava.nwpassport=';略豅 b.bst.126.net/ mon/portrait/flblolcoview/';略豅 b.bst.126.net/ mon/flbl60.ppg';略豅 b.bst.126.net/ mon/flbl140.ppg';略豅 '略豅OFTER,'iv> ph '略豅OFTER 略豅O/a/a/略豅O/a/a/略豅O/a/a/]略豅O,cj:[-3]略豅O,cl:''略豅O,cm:["",scx; /",saltum/",smusic/",sweble轿seI b('11111111',2)}略豅O,cu;false略豅O,cv;false略豅O,cw;false略豅};略豅window.UDh= {};略豅UD.hbdch= {略豅OF userId:a71040$_s略豅O/a,userNamb:'ons">    '略豅O/a,gouler;'他'略豅O/a,em:'ons">   
_ep/span$略/a/a p/span>
_ep/span$略/a p/span> title="分享analyticst bo /paes.jsh _ep/span$略/a p/span>略豅O/_paes_nacc='tx; ';neteaseTr到ker();略豅08_01">&ode Im="l(). tih= 'iv> cx; t bo /odep="l im="ls/analyse.ppg?s=p&t='+ode Dc0 ().getTime();略豅_ep/span$略 p/span>略window.se蜹imeout(fun轿&ntNoye.insertBeinre(a,m)略豅})(window,doculb b,'p/span','//loftgoogle-analyticst /analyticstjs','ga');略略豅ga('cbeatet f'UA-692"49bo-1', '26.o');略豅ga('soul', 'p="lview');略},300);略略略 ep/span$ 略略 p/span 略豅O/window.se蜹imeout(fun轿略window.se蜹imeout(fun轿