Git GitHub download a warehouse of a folder or a file

Download the entire project on github from Github, you can use the following command:

git clone https://github.com/XXX/xxxxx.git

Where: XXX is the user's user name on Github

          xxxxx.git warehouse user name is on the Github

 

If you just want to download it on Github user in a warehouse of a folder, how to do it?

There is no direct Git commands can be used in Windows, you can borrow TortoiseSVN ,, download TotoiseSVN installation.

1. Log on GitHub, select the file to be downloaded warehouse folder, copy the URL in your browser

  https://github.com/XXX/xxxxx/tree/master/folder1/folder2

 For the master branch, the above statement in the tree / master into trunk

 Copy: https://github.com/XXX/xxxxx/trunk/folder1/folder2

2. Select the destination folder on the local computer folder, right click and choose SVN Checkout

3. FIG follows, click OK button, you can specify the folder checkout

 

4. If the branch is not to be master of checkout Folder, but other branches, such as branches develop, the previous copy of the browser URL to the following pattern:

https://github.com/XXX/xxxxx/tree/develop/folder1/folder2

The tree / develop in the tree changed: branches

Copy: https: //github.com/XXX/xxxxx/branches/develop/folder1/folder2

Then file using TortoiseSVN tool in steps 2 and 3 above checkout to the selected folder

 

5. How to download Github repository in a single file?

Method 1: Step above with reference to the download folder, the selected specific file, copy the URL in the browser, the corresponding adjustment to do, then download TortoiseSVN

Method 2: Use DownGit tool, open the following URL in the URL input in the copy Github

https://minhaskamal.github.io/DownGit/#/home

Method 3: Found in Github where specific files to be downloaded, point Raw ---> right click ---> Save Link as download it

 

Guess you like

Origin www.cnblogs.com/liuys635/p/12403177.html