Forking vs cloning on GitHub
First-time Git and GitHub users often wonder what the difference is between forking and cloning. There’s usually hesitation, as nobody wants to mess up the existing code in their first open-source repository. Forking and cloning both create copies of a repository; the difference is where you want to store the copy.
- Forking creates a copy of the repo on your GitHub account. It’s accessible when you log in, and you can edit and contribute to it through the GitHub website.
- Cloning creates a copy of the repo on your local machine. You can edit and contribute to it through a text editor.
To prevent your edits from conflicting with other users’ code, clone your forked repository—not the original one.