Copy the project template
- Fork the "API Horoscope" template at https://github.com/spinecone/api-horoscope (by forking this template, you'll be able to keep changes you make to separate from the original template). Make sure you're not forking https://github.com/spinecone/Your-First-API-Integration, which just contains the instructions you're reading now.
- Now you've got your own copy of the horoscope template! To use it, visit https://github.com/your_username/api-horoscope
- Next, copy the HTTPS clone url for the fork (it should resemble https://github.com/your_username]/api-horoscope.git)
For the rest of this tutorial, you'll need to use a terminal to copy the project template and run the code you'll be writing. If you don't already have one installed, I recommend cmder for Windows and iTerm for Mac.
- Open a terminal window and type
git clone the-url-you-just-copied
- Finally, type
cd api-horoscope
to enter the directory you just created.
What did we just do?
When you "fork" a GitHub repository, you're taking a project someone else has written (in this case, the api-horoscope template), and creating a copy of it that you can make changes to. The changes you make on your fork won't affect the original repository. You can read more about forking here.
"Cloning" a GitHub repo means taking some code that exists on GitHub and putting it somewhere that you can use and edit it. Here, we took your forked copy of the api-horoscope template and put it on your computer.
One thing you might be wondering is why we didn't just make a clone of the original api-horoscope template. The reason is that only people who have been granted permission to a repository can push changes to it. By making a fork of api-horoscope, you can push whatever changes you want to your fork without needing access to the original.