This is the CartoDB example app I put together for a blog post.
First, clone it to your local machine. Then, you need to initialize submodule, both for this and for one of the libraries. That goes like this:
git submodule init
git submodule update
cd libs/WhirlyGlobe-Maply
git submodule init
git submodule update
WhirlyGlobe-Maply is pulling in a number of open source projects and its demo data. You can live without the resources directory if you want to cut that down a bit.
Questions to sjg@mousebirdconsulting.com