4 ms·
With shallow checkouts cloning is much quicker. You could try combining it with sparse checkouts too. You can even have Git fetch the full history in the backgr
by williamvds 5y ago
With shallow checkouts cloning is much quicker. You could try combining it with sparse checkouts too. You can even have Git fetch the full history in the background, and from a quick test you can do stuff like commit while it's fetching. Obviously the limited history means commands like log and blame will be inaccurate until it's done.
$ git clone --depth=1 <url>
$ cd repo
$ git fetch --unshallow &
$ <do work>
- vtbassmatt 5y agoThis is really expensive for the server (the unshallow step specifically). Consider a partial clone here instead.
- williamvds 5y agoIs unshallowing any more expensive than a normal clone? The shallow clone is for the benefit of the user so they can get to work sooner.
- vtbassmatt 5y agoIt is, because of the way the server has to recompute packfiles. I realize that you may choose to optimize for the user over the server, but a partial (blobless) clone should satisfy both.
- erik_seaberg 5y agoDoes the server rule out sending a packfile that you only need 95% of? That seems like a good thing to optimize.