Code Yarns ‍👨‍💻
Tech BlogPersonal Blog

How to git clone only the latest revision

📅 2014-Jun-07 ⬩ ✍️ Ashwin Nanjappa ⬩ 📚 Archive

Most of the time when I clone a Github repository, I just need the latest revision. There is no point wasting my time cloning the entire repository with all the changes.

To do this:

$ git clone --depth=1 https://github.com/joe/foobar.git

Tried with: Git 1.9.1