|
What's the difference between forking and cloning a repository? |
Answered by
naheel0
Mar 28, 2026
Replies: 1 comment
|
Cloning creates a local copy of a repository on your machine. You're downloading the code to work with it locally.
Forking creates your own copy of someone else's repository on GitHub (or similar platform). It's hosted on your account and lets you propose changes via pull requests. Key difference: Clone = local copy. Fork = your own remote copy. |
0 replies
Answer selected by
jaseel0
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Cloning creates a local copy of a repository on your machine. You're downloading the code to work with it locally.
git clone https://github.com/user/repo.gitForking creates your own copy of someone else's repository on GitHub (or similar platform). It's hosted on your account and lets you propose changes via pull requests.
Key difference: Clone = local copy. Fork = your own remote copy.