A:
Go to github, find the project you want to clone, and click Clone or Download.
Read the github help page for more information about using git:
If you're a Windows user, see this answer for more information about installing git for Windows:
How do I install git for Windows?
git has command-line tools that allow you to create and manage repository.
You'll be able to do the same with your code using these tools
for instance, creating a new repository, and adding your files and
folders:
$ git init my-first-repo
To test this new repository before actually creating it, you can use the git
command-line tool to create a dummy project (my-first-repo-test) and
then work on this temporary project:
$ git init my-first-repo-test
$ cd my-first-repo-test
$ touch README.md
$ git add README.md
$ git commit -m "adding README.md"
$ git remote add origin
$ git push origin master
When you're ready, you can push the test project to your real
repository (my-first-repo):
$ git remote add origin
$ git push origin master
With this setup in place, when you want to get back to your original
project, you'll be able to:
$ git remote -v
origin (fetch)
origin (push)
Note: In our case, we're assuming we have git installed on our computer,
and that we have already cloned our GitHub repository (see
).
At this point, you can now go ahead and explore your project from
your terminal:
$ git clone ac619d1d87
Related links:
Comments