The first time Claude Code or Cursor asks "want me to commit this?" or "should I open a branch?", it can feel like the tool switched to a foreign language. It didn't — it's really just a handful of simple ideas. Once you know them, every AI coding tool makes a lot more sense.
當 Claude Code 或 Cursor 第一次問你「要不要 commit 這個?」或「要開一個 branch 嗎?」,感覺就像它突然講起外星語。其實不是——那只是幾個簡單的概念。搞懂它們之後,任何 AI 寫程式工具你都聽得懂。
Every AI coding tool — Claude Code, Cursor, Codex, all of them — is built on top of Git, the same version-control system professional developers have used for 20 years. Their vocabulary leaks into your conversation. That's not a bug you did wrong; it's just what's underneath. Here's a quick preview of the six words worth knowing — we'll unpack each one below.每一個 AI 寫程式工具——Claude Code、Cursor、Codex——底層用的都是 Git,一套專業工程師用了 20 年的版本控制系統。它的詞彙自然會出現在你的對話裡。這不是你哪裡做錯了,只是底層本來就長這樣。以下先快速預覽六個值得認識的詞,下面會一一拆解。
The save-and-history system itself. Runs quietly inside your AI tool.
存檔與歷史紀錄系統本身。安安靜靜在你的 AI 工具裡運作。
The website that stores a copy of that history online — where your site lives.
把那份歷史紀錄放到線上的網站——你的網站就住在這。
A checkpoint — a saved snapshot of what just changed, with a short note.
一個檢查點——把剛剛改的東西存成快照,附一句簡短說明。
Uploading your checkpoints to GitHub — this is what makes your site go live.
把你的檢查點上傳到 GitHub——網站就是這樣上線的。
A separate draft version of your site you can experiment on safely.
一個獨立的草稿版本,可以放心在上面實驗。
A request to merge a branch's changes back into the live version.
請求把某個 branch 的變更合併回正式上線的版本。
This is the single most confusing pair of words in the whole topic, because they sound like the same thing said twice. They're not.這是整個主題裡最容易搞混的一對詞,因為聽起來像同一個字講兩次。其實不是。
In practice: your AI coding tool speaks Git on your computer (or in its own workspace) — that's where commits happen. GitHub is the destination those commits travel to when you push, and it's what actually serves your live website.實際運作上:你的 AI 工具在你的電腦(或它自己的工作空間)裡講 Git——commit 就是在那裡發生的。GitHub 則是 push 之後,這些 commit 要去的目的地,也是真正把你的網站放上線的地方。
These two always travel together, and they map onto something you already do all the time: saving a game, then syncing that save to the cloud.這兩個詞總是一起出現,其實對應到你早就在做的事:存遊戲進度,然後把存檔同步到雲端。
What AI is really askingAI 其實在問什麼
| What it says它說的話 | What it means它的意思 |
|---|---|
| "Want me to commit this?" | Should I save a checkpoint of what I just changed?要不要把我剛改的東西存成一個檢查點? |
| "Should I push?" | Should I upload that checkpoint to GitHub so it goes live?要不要把那個檢查點上傳到 GitHub,讓它上線? |
| "Commit message?""Commit message?" | What one-line note should I attach to this checkpoint?這個檢查點要附上哪一句說明? |
These three come up once your site (or your AI tool) needs to talk to a copy of your project that already exists somewhere else.當你的網站(或你的 AI 工具)需要跟另一個已經存在別處的專案副本溝通時,就會用到這三個詞。
main. When you're happy with the branch, its changes can be merged into main.一個獨立、平行的網站版本,讓你可以試點什麼——改版、有風險的修改——而不會動到已經上線的版本。上線的版本通常叫 main。等你對這個 branch 滿意了,它的變更就可以合併回 main。
main as the printed handout you already gave your class, and a branch as the draft you're still marking up. Nobody sees the draft until you decide to hand it out too.
把 main 想成你已經發給學生的講義,branch 則是你還在改的草稿。在你決定要發出去之前,沒有人會看到那份草稿。
These two are less urgent than the words above. Skip this part on a first read if you just want the basics — come back once your AI tool starts mentioning them.這兩個詞沒有上面幾個急迫。第一次讀如果只想抓基本概念可以先跳過——等你的 AI 工具開始提到它們時再回來看。
main, with a review step in between — a chance to look over what changed before it goes live. Working solo, you might just review and click merge yourself; in a team, someone else usually looks first.請求把某個 branch 的變更合併回 main,中間會有一個檢查的步驟——在正式上線之前先看過改了什麼。自己一個人做的話,你可能自己看過就按合併;如果是團隊合作,通常會請別人先看過。
This is the part that matters most for peace of mind: your history is never actually gone. Because every commit is a saved checkpoint, you — or your AI tool — can always step back to one that worked.這部分最能讓你安心:你的歷史紀錄其實從來不會真的消失。因為每一個 commit 都是一個存好的檢查點,你——或你的 AI 工具——永遠可以退回到能正常運作的那一個。
Things you can just ask AI to do你可以直接請 AI 做的事
"Please revert to the last working commit."
"Can you show me the recent commit history?"
"Undo the last change and go back to before this file was touched."
| Term術語 | Plain English白話說法 |
|---|---|
| Git | The save-and-history system underneath your AI tool.你 AI 工具底層的存檔與歷史紀錄系統。 |
| GitHub | The website that hosts that history online — and your live site.把那份歷史放到線上的網站——也放著你上線的網站。 |
| Commit | A saved checkpoint of what just changed.剛剛改動存下來的一個檢查點。 |
| Push | Uploading your checkpoints to GitHub.把你的檢查點上傳到 GitHub。 |
| Clone | Making your own full copy of a project, once, at the start.一開始把整個專案完整複製一份給自己。 |
| Pull | Fetching the newest changes down into your copy.把最新的變更抓下來、更新到你的副本。 |
| Branch | A separate draft version you can experiment on safely.一份可以放心實驗的獨立草稿版本。 |
| Worktree | Two AI agents working on two branches at once, in separate folders.兩個 AI agent 各在自己的資料夾,同時處理兩個 branch。 |
| Pull RequestPull Request | A request to merge a branch back into the live version, with a review step.請求把 branch 合併回上線版本,中間有一個檢查步驟。 |
| Revert | Stepping back to an earlier, working checkpoint.退回到之前一個能正常運作的檢查點。 |
Answer every question, then check your score. This grades itself right here in your browser — nothing is saved or sent anywhere.每一題都作答完,再檢查你的分數。這個測驗就在你的瀏覽器裡自動算分——什麼都不會被存起來或傳出去。