git 使用笔记

git fetch 与 git pull 都是从 remote 端取信息
在不接参数时,git fetch 与 git pull 有如下不同

1. git fetch 可以在一个 bare类型的repository内执行,而git pull 不可以
2. git fetch 只从远程端取repository信息,如新的branch,tag,及新的代码变化,也就是更新.git或bare型repository中的内容

From git://git.kernel.org/pub/scm/boot/u-boot/galak/u-boot
* [new branch]      base       -> origin/base
* [new branch]      bootm      -> origin/bootm
* [new branch]      fsl_ddr    -> origin/fsl_ddr
* [new branch]      master     -> origin/master
* [new branch]      mpc85xx    -> origin/mpc85xx
* [new branch]      origin     -> origin/origin
* [new tag]         DENX-2005-10-29-2350 -> DENX-2005-10-29-2350
* [new tag]         LABEL_2002_11_05_0120 -> LABEL_2002_11_05_0120
* [new tag]         LABEL_2002_11_05_1735 -> LABEL_2002_11_05_1735
但 git fetch 不会 checkout出任何代码
git pull 不仅会执行git fetch的操作,git pull 还做了merge的操作。

【摘自】http://hi.baidu.com/d_life/item/e943fd97c63b25be83d29597

posted @ 2012-06-25 13:10  yanghuahui  阅读(397)  评论(0)    收藏  举报