Forking and Cloning
If you want to set up a new project on Github, the first step is to create a new repository. These steps will walk you through the process:
- Navigate to Github through your browser and sign in to your Github account
- In the upper right corner of the page, click the plus sign and select New Repository from the dropdown menu
- Give your repository a name
- Select if the repository will be visible publicly or privately
- Select the option to initialize with a README
- Select the type of license for your project
- Click Create Repository
Your repository is now created on Github! Next you'll want to clone the repository to your computer so you can start tracking and committing your work.
- In Github, navigate to your newly created repository, find the SSH clone URL option and click Copy to Clipboard
- Open a terminal session and go to the directory where your project will be saved
- Type the command: git clone, paste the copied SSH clone URL and hit enter (note: you may be asked for your user name and password within the terminal)
A new directory has been created on you local machine containing the README and license agreement! You can now start creating your project in this directory and commit to your Github repository!
Sometimes you won't be creating a project from scratch and instead will be contributing to an existing project. For this you will fork an existing repository to create a copy that you can work on without affecting the original. To do this you'll:
- Navigate to the repository you want to fork in Github
- In the upper right of the screen, click the fork button and a popup will appear asking you to select where to fork this repository
- Select your Github account
A forked version of the repository has been created! Now you just need to follow the steps for cloning this repository to your local machine.