Forking & Cloning
Understanding the difference between server-side copies and local downloads.
Server vs Local Copies
**Forking:** A fork is a personal, server-side copy of another user's repository that lives on your GitHub account. It shares code and visibility settings with the original 'upstream' repository.
**Cloning:** A clone is a local copy of a repository that lives on your computer. Cloning downloads the files and history from GitHub to your local machine so you can develop.
Why it matters
Web developers often want to contribute to open-source projects (like React or Next.js) where they do not have direct write/push permissions.
Forking gives them a personal copy of the project in the cloud where they have full read and write access. They can make changes safely, and then submit a Pull Request back to the original repository.
How it works
**Forking (Server-Side):** Happens entirely on GitHub's servers. You click the 'Fork' button on the website, and GitHub instantly duplicates the project into your account.
**Cloning (Local):** Happens on your local machine. You run git clone <url> in your terminal. Git fetches the data from GitHub and creates a working directory on your hard drive.
Check yourself
Pick an answer to lock it in, then read why. Getting one wrong is part of how it sticks.
Remember this
- Forking is copying a repo to your GitHub account.
- Cloning is downloading a repo to your local machine.
- Forks do not automatically stay synced.
- Forking is essential for contributing to open source.
Done with this concept?
Mark it complete to track your progress. No login needed.