How to fetch all git history after I clone the repo with `--depth 1`?
GitGit Problem Overview
There is a big repo with thousands of commits. When I clone it, I just want to see the latest code, and don't wait for too long, so I run:
git clone git://..../... --depth 1
But later, I want to see all the history commits, but I don't know how to fetch all the histories.
Git Solutions
Solution 1 - Git
Use git pull --unshallow
and it will download the entire commit history.
Solution 2 - Git
Alternatively, you can also run git fetch --depth=1000000
.