Home > Article > Development Tools > How to download a specified folder from github
GitHub is currently one of the most commonly used code hosting platforms. It provides developers around the world with a platform to centrally manage, share and collaborate on open source projects. In GitHub, we can find millions of code libraries and find the code resources we need. Git is a very powerful version control tool and the core technology of GitHub.
However, GitHub's default download method is to download in the form of a library. In other words, if we want to download a specified folder, we must download the entire library. In actual development, we only need to download one of the folders. This problem bothers many developers, so is there any solution?
The answer is yes. GitHub does provide a way to download only a certain folder: using SVN.
in the GitHub project On the page, we can see the SVN address of the project. We need to copy this address for later use.
If you haven’t installed the SVN tool yet, it is recommended to install it first. Under Windows, we recommend using TortoiseSVN.
After opening TortoiseSVN, right-click in the blank space and select the "SVN Checkout..." option. Enter the SVN address you just copied into "URL of repository" and click "OK".
In the pop-up dialog box, we can see all the folders and files in the project. Select the folder we want to download, for example, we want to download the "src" folder in the project. After selecting the folder, click OK.
The process of downloading the specified folder is like downloading the entire library. But here, we only need to download the specified folder. After the download is completed, we can find the folder we just selected in the local directory.
In short, the default download method provided by GitHub is to download the entire library, but by using SVN, we can indeed download the specified folder, so there is no need to download the entire library. However, this method requires us to install the SVN tool in advance and requires certain operations, which is not convenient and fast enough. If you just need to download some files, you can get the link directly on the GitHub page and download it through other download tools.
The above is the detailed content of How to download a specified folder from github. For more information, please follow other related articles on the PHP Chinese website!