As web developer I learn using Internet a lot, and for developed project need or public project storage I always use GitHub and love it.
Some time I satisfied after watched codes and it makes me happy if I got my solution quickly. But everything not be hassle, complication in development still having their own place.
My almost search ends with GitHub and lot's of public projects provide me everything.
There is two way to get project from GitHub:
1- Direct .zip Download from URL, extract in directory and then run.
2- Make a clone and run directly in your browser (depends upon cloning)
Direct download and extract in a folder to run as you need, but cloning is command line method and if you are beginner it's good habit to use command line. So I'm going to share a method by using you can make clone of any public git hub project and run locally on your computer.
How to clone GitHub Projects on local computer:
- Download Git Bash from https://msysgit.github.io/ (for Windows) and install as normal software installation.
- After installation run click on Git Bash icon from start menu.
- A command line will appear, how to set path for your project directory,
(Ex- my project location is c->xampp->htdocs)
type cd c: to select c drive and hit enter. (cd means current directory)
cd c:
type cd xampp and hit enter (change directory as per your need it's only example)
cd xampp
Type cd htdocs
cd htdocs
Now we will learn cloning procedure of GitHub project in this directory.
Goto GitHub and copy your required public project clone URL as below image:
Come back to Git Bash and paste as below:
git clone {COPY_URL} {Directory_Name} and hit enter, wait for some time requested GitHub project will be clone.
When cloning finished, just goto folder and you can find everything of online project.
git clone https://gist.github.com/96419d92bb08c984d55c.git tricksway
How to paste URL in Command Line ?
No worry sometime a small things makes problem for you and at time you need to concentrate and check what you are missing, if you can't find way to paste URL in command line just follow below image:
Your project directory looks like below image:
Note: Cloning of GitHub project in this method only valid for public mode projects.
Thanks for reading this article let me know if you are facing any problem I will surly help you.