How do I checkout just a source tree from git (without the repo history, etc.)

时间:2015-05-28 03:17:44

标签: git version-control

I am working with a git repository that is over a 100GB when it is checked out. I don't have enough space on disk to keep the whole repo around, and I only need read access to it, I will never submit. How can I get git to just checkout the current state of the files, and not the entire history?

1 个答案:

答案 0 :(得分:1)

尝试浅层克隆:

git clone --depth 1 <repository>

那将克隆历史深度为1的修订版,而不是存储库的完整历史记录。