Code Yarns ‍👨‍💻
Tech BlogPersonal Blog

How to git clone only the latest revision

📅 2014-Jun-07 ⬩ ✍️ Ashwin Nanjappa ⬩ 🏷️ clone, git ⬩ 📚 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

Tried with: Git 1.9.1

© 2022 Ashwin Nanjappa • All writing under CC BY-SA license • 🐘📧