Day: December 7, 2017

How to avoid cloning full git repository

I was used to clone the NuttX git repository all the time I need a clean copy. But this is not a good idea, because it waste time and increase the network traffic.

Sebastien Loquert gave a suggestion to improve it:

$ sudo mkdir /opt/nuttx

$ cd /opt/nuttx

$ git clone https://bitbucket.org/nuttx/nuttx

$ git clone https://bitbucket.org/nuttx/apps

$ cd ~/nuttxspace

$ git clone /opt/nuttx/nuttx nuttx

$ git clone /opt/nuttx/apps apps

$ cd nuttx

$ git pull

$ cd ../apps

$ git pull

This simple tips will reduce the time I waste download the full repository and will reduce the network traffic. It is important if you are using 3G/4G and you pay by amount of the downloaded data.