減少git clone 下載的時間與空間
在AOSP(Android Open Source Project)的專案中有蠻多的repositories需要fetch,而抓code就是一件很花時間的動作,平時抓某些大型github 開源專案也會花很長時間,AOSP中有一個kati。
一般抓code的方法:
git clone https://github.com/google/kati.git
只抓深度為1的code:
git clone https://github.com/google/kati.git --depth 1
使用depth=1時,看git log會只有一筆並且標示grafted
更多git clone詳細說明
git clone -h