![]() Remote: Total 1 (delta 0), reused 1 (delta 0), pack-reused 0 Remote: Total 1 (delta 0), reused 0 (delta 0), pack-reused 0 Remote: Counting objects: 100% (1/1), done. % git checkout origin/master - UbuntuMono Remote: Total 52 (delta 1), reused 35 (delta 1), pack-reused 0 Remote: Compressing objects: 100% (49/49), done. Using the -filter + checkout method in Ciro Santilli's answer really cuts down the size, but as mentioned there, downloads each blob one by one, which is slow: % git fetch -depth=1 -filter=blob:none Remote: Total 310 (delta 75), reused 260 (delta 71), pack-reused 0 The steps above ended up downloading some 11 MB, where the Ubuntu Fonts themselves are ~900 KB: % git pull -depth=1 origin master ![]() I had an occasion to test this again recently, trying to get only the Ubuntu Mono Powerline fonts. ![]() Instead of a normal git pull, try: git pull -depth=1 origin master You might be better off using a shallow clone. Should probably read the official documentation for sparse You might want to have a look at the extended tutorial and you git/info/sparse-checkoutĮcho "another/sub/tree" >. git/info/sparse-checkout, eg: echo "some/dir/" >. Now you need to define which files/folders you want to actually check Then do: git config core.sparseCheckout true ![]() This creates an empty repository with your remote, and fetches all Just add the remote without a fetch: git remote add origin Īnd then do a shallow fetch like described later. It will do a fetch, which will pull in the entire history. Since I'm quoting another post, I don't want to edit the quoted parts, but do not use -f with git remote add. ![]() The steps to do a sparse clone are as follows: mkdir Git is an essential tool for collaborating with other programmers.You will end up downloading the entire history, so I don't see much benefit in it, but you can checkout specific parts using a "sparse" checkout. In the command line (Terminal, Git Bash, or Windows Command Prompt) navigate to the folder where you want to put the repo that you'll be downloading.Ī new folder for the repo will be created here, so you do not have to create a folder.Ī copy of the repo will be downloaded and you'll end up with a new folder (containing all the files in the repo) on your computer. They give you the entire clone command including the URL.Ģ.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |