← 返回目錄首頁 📂 01_github_skill/git_github_skill.html
🔄 快速切換網頁:
✦ 贊助商廣告 / SPONSORED ✦

Git & GitHub v2.4 Interactive

專為工程師打造的指令速查手冊與視覺行動模擬器

動態即時演算模擬器

Git 運作架構 & 分支動作動態可視化

點擊下方按鈕,親眼看見指令如何推動程式碼在各個生命區域之間穿梭、分支如何衍生與合併!

Step 1

工作區 Working Tree

你正在實體編輯的檔案

index.html (修改)
Step 2

暫存區 Staging Area

準備打包成 Commit 的快照

空空如也 (Untracked)
Step 3

本地倉庫 Local Repo

已完整紀錄在 .git 庫中

commit #7fa3d
Step 4

遠端 Remote (GitHub)

雲端伺服器與團隊共享庫

origin/main
git@demo:~$
點選下方按鈕,觀察 Git 內部資料如何流轉...
按 / 搜尋
顯示 0 個指令

GitHub 快速秘笈與常用工作流 (Workflow)

日常推 code、拉 PR、或是解決 SSH 連線問題的萬用錦囊

🔑 產生與測試 SSH Key

ssh-keygen -t ed25519 -C "[email protected]"
ssh -T [email protected]

生成金鑰後將 ~/.ssh/id_ed25519.pub 內容貼至 GitHub Settings ➔ SSH Keys。

🚀 首次推送現有專案至 GitHub

git remote add origin <repo_url>
git branch -M main
git push -u origin main

-u 代表設定上游分支 (Upstream),之後只需輸入 git push 即可。

⚡ GitHub CLI (官方指令工具)

gh auth login
gh repo create my-project --public
gh pr create --fill

不需打開瀏覽器,即可在終端機內完成 PR 建立與審查。

指令已成功複製!