Method 1- Clone the source code locally.
After the cloning is completed, the source code will be downloaded locally and a local code base will be created. You can modify the code locally at will, use the commands provided by git to operate the code, and have corresponding history and branches.
Method 2- Download the source code Zip package
It's just the packaging of the latest source code. Without git object information, you can't view the branches and history of the code.
Method 3-directly browse the code online and copy the desired code segment.
The source code of the project can be viewed directly in the code browsing window, and you can copy or download it directly if you are interested.
Tools/raw materials
food/rice bucket
Method 1- Clone the source code locally.
1
Go to github.com to find the project you are interested in, such as Jquery, and copy the cloned URL of the project.
2
Open the Git Bash command line window locally.
three
Paste the copied clone URL into the command line window, and then press enter. After executing the clone command code, download it locally.
Git clone [URL]
end
Method 2- Download the source code Zip package
1
Find the project you are interested in, click the "Download Zip" button on the project page, and the source code can be downloaded locally.
end
Method 3-directly browse the code online and copy the desired code segment.
The source code of the project can be viewed directly in the code browsing window, and you can copy or download it directly if you are interested.