Git example for example with a single clone file

We read about git narrow clones . Let's say we want to use this new function as a last resort and just with a minimum bandwidth edit a single file from a massive remote repository and wring our commit.

The only examples you can find are: git clone --no-checkout --filter=blob:none "file://$(pwd)/srv.bare" pc1 Add add -depth 1 to save even more data traffic and disk space. But how do we point out that a single remote file without launching "does not seem to be a git repository error"? git version 2.17.0.290.

+4
source share
1 answer

I have not tried, but I think after cloning you should do:

$ cd <CLONE>
$ git config core.sparseCheckout true
$ echo /dir/file >.git/info/sparse-checkout
$ git reset --hard

blob (s). , .

, , , blobs - . , , , , .

PS: --filter=sparse:path=<path>, , , , , , , , , .

PS2: , . , . . . , , , blobs , .

0

Source: https://habr.com/ru/post/1696295/


All Articles