Clone and fork
Also: git clone · fork · 複製倉庫 · 分叉 · clone 和 fork 的差別
clone copies a remote repo onto your computer with a command; fork copies someone else's repo into your own account on a website.
When you will meet it
A tutorial says 'clone this repo' and you go hunting for the fork button on GitHub; or the reverse — you want to change someone's project, only clone it, and discover after editing that you cannot push back. One action happens on your computer and the other on a website, and mixing them up is exactly where people stall.
An analogy
Cloning is borrowing a library book home. Forking is first registering in the library's system that you want your own copy on your own shelf — only then can you take that copy home.
Minimal example
# clone:本機指令,把遠端 repo 抓下來(HTTPS 網址在 GitHub 的 Code 按鈕裡)
git clone https://github.com/ollama/ollama.git
# fork:在 GitHub 網頁上按 Fork,得到的網址會變成——
# https://github.com/你的帳號/ollama.git
# 然後 clone「你自己那一份」,改完才推得上去
git clone https://github.com/your-name/ollama.gitA fork is not a command, it is a button on a website. After forking you still have to clone your own copy before you can change anything on your computer.
What people get wrong
- Assuming a fork puts the code on your computer. Forking happens entirely on the website; your machine still holds nothing until you clone.
- Assuming a fork is a backup. A fork keeps its link to the original repo; it exists because you intend to change the code and possibly send the change back, not as a safety copy.