git clone of git clone or download a single folder of a repository
Application Scenarios:For example, the entire source code of GitHub is very large, several Gs, or you are not interested in a large amount of test code in the source code, and you don't want to clone all of it, but just want to clone all the source code under a certain folder of the project.
1. If you want to clone someone else's project or your own
A very simple website solves it.DownGit: You only need to find the URL of the corresponding folder in the repository, enter it, and click Download to automatically package and download:
DownGit link:https://www.itsvse.com/downgit/
(To explain here, because the original author's project cannot be used, this is a new project that I have modified, and the resource link has been changed to a domestic CDN, so the access speed is very fast!) )
Attached is the source code:
Tourists, if you want to see the hidden content of this post, please Reply
2. Clone your own project
Note: This method will download the entire project, but only the folder that you need will appear in the local project file. Similar to downloading first and then filtering.
Sometimes we only want to download single or multiple folders of the repository from gitclone, not all the repository contents, which is very hassle-free, so let's start the tutorial below
Before Git 1.7.0, this was not possible, but fortunately after Git 1.7.0 the Sparse Checkout mode was added, which made it possible to check out specific files or folders.
For example:
Okay, that's it!!
|