git断点续传

git断点续传

Git clone不行,

用git init

git fetch git://…..git

即使断掉了,可以继续

git fetch git://…..git

等到fetch完会出现以下字样

From git://….

*branch           HEAD                -> FETCH_HEAD

意思是把最新的数据fetch到了本地的FETCH_HEAD分支上去了

然后用git checkout FETCH_HEAD

或者也等同于git fetch git://…..git HEAD:FETCH_HEAD(没测试


例如:

(1): git fetch git://repo.or.cz/tomato.git

如果中途掉线,继续执行上面(1)命令

(2): git checkout FETCH_HEAD 或者git fetch git://repo.or.cz/tomato.git HEAD



异曲同工之妙

1. git clone git://android.git.kernel.org/ + project path.

2. mkdir mydroid

   cd mydroid
   repo init -u git://android.git.kernel.org/platform/manifest.git
   repo sync

 

git clone获取比较大的源码时, 不能断点续传, 比较恼火.

 

可以使用 git fetch 解决:

     mkdir common

     cd common

     git init

     git fetch http://android.git.kernel.org/common.git

     传完后,

     git branch -a

     git checkout remotes/....

如果中间断掉了, 可以直接进入common目录, 继续git fetch就可以续传了.


评论 2
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值