Question

What is the difference between forking a GitHub repository and cloning it to my local machine?

I would like to contribute to an open source library and I think the easiest way is to clone the repository and then send a pull request to the owner of the library to be reviewed. But why do other people fork repositories?

Was it helpful?

Solution

In order to send a pull request using the Github user interface, you have to fork a repository. (By the way, this is done automatically for you if you just want to make a trivial string/doc change using the online "Edit" feature of GitHub.)

Forking and cloning a local copy are not mutually exclusive.

You would typically do both, to build and test locally, and when happy, commit and push up to your fork.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top