Fork a repository on GitHub

After using GitHub by yourself for a while, you may find yourself wanting to contribute to someone else’s project. Or maybe you’d like to use someone’s project as the starting point for your own. This process is known as forking.

Creating a “fork” is producing a personal copy of someone else’s project. Forks act as a sort of bridge between the original repository and your personal copy. You can submit Pull Requests to help make other people’s projects better by offering your changes up to the original project. Forking is at the core of social coding at GitHub.

For this tutorial, we’ll be using the Spoon-Knife project, a test repository that’s hosted on GitHub.com.

 

To fork the Spoon-Knife project to your local directory follow these steps:

  1. Browse to the Spoon-Knife project on GitHub
  2. Click the Fork button
  3. You will now be directed to a copy of the repository in your GitHub account
  4. You can clone this repository to your Windows PC by running the following command from the Git shell:
git clone https://github.com/<your GitHub user name>/Spoon-Knife

Note that the above url is simply the url from your GitHub account for the Spoon-Knife repository.

You now have a local copy of another repository and you can view and edit it as you wish. Changes you make to the fork will have not impact on the original project. Were you to decide to make a contribution to the original project then you would want to contact that project's owner and find out how to contribute code.