git clone --depth 1 https://github.com/user/repo.git

Category: Git - Core

git clone --depth 1 https://github.com/user/repo.git

Shallow clone with only the latest commit history

Downloads only the most recent snapshot of a repository, not the full history. Faster and uses less disk space. --depth 1 means 'only the latest commit'.
Looking for more? Search all 7,657 commands — works offline, in English or Spanish, and fixes typos.