4 ms·
I think you can clone just the last commit: > Provide an argument of -- depth 1 to the git clone command to copy only the latest revision of a repo: git clo
by yboris 5y ago
I think you can clone just the last commit:
> Provide an argument of -- depth 1 to the git clone command to copy only the latest revision of a repo:
git clone -–depth [depth] [remote-url]
- jeffbee 5y agoOK but it still takes a long time with millions of source files.
- WorldMaker 5y agoGit has some strange behaviors with shallow clones (trying to manage volume using --depth). Shallow clones are great for CI builds, but not so great with working copies used actively by developers. At this point in git the better tool is called "sparse clones" (using the --sparse keyword and some other associated tools). A lot of interesting engineering work has been put into making "sparse clones" very performant on "conical sections" ("sparse cones") of a repository at a time. (In the way of checking out a single sub-directory of a monorepo and just its history type of thing.)