Week 11 of 12 📦
การทำงานกับ Git และ GitHub
Git 工作流与 GitHub 集成
Click a card to flip it. คลิกการ์ดเพื่อพลิก 点击卡片翻面。
What does /diff show?
/diff แสดงอะไร?
/diff 显示什么?
Which word means 'at the end'?
คำใดหมายถึง 'สุดท้าย'?
哪个词的意思是“在最后”?
What creates an isolated git copy?
อะไรสร้างสำเนา git ที่แยกจากกัน?
什么可以创建一个隔离的 git 副本?
How to do it
git status and git diff, writes a message, and shows the commit command before running it.How to do it
git checkout -b feature/login.main stays safe.How to do it
gh CLI signed in (gh auth login).gh pr create.How to do it
/diff to open an interactive viewer of all uncommitted changes./diff before every commit.How to do it
claude --worktree feature-name to work in an isolated copy of the repo.Step by step
/diff — it should now be clean. Finally, describe what you did using first, then, next, finally.✓ You did it right if: git log shows your commit sitting on the new branch.
# FIRST, make a branch > Create a branch called practice/git-workflow * Bash(git checkout -b practice/git-workflow) Allow? > y # THEN, change something and commit it > Commit my change with a good message * Bash(git add app.py) * Bash(git commit -m "Fix greeting typo in app.py") Allow? > y # NEXT, check that everything is clean > /diff (no uncommitted changes) # FINALLY, share it > Push this branch and open a PR * Bash(git push -u origin practice/git-workflow) * Bash(gh pr create --title "Fix greeting typo") Allow? > y https://github.com/you/your-repo/pull/7
| Command / Tool | English | ภาษาไทย | 中文 |
|---|---|---|---|
commit | Save changes to repo | บันทึกการเปลี่ยนแปลง | 把更改保存到仓库 |
branch | Create parallel development line | สร้างสายการพัฒนาขนาน | 创建并行的开发线 |
pull request | Request to merge changes | ขอรวมการเปลี่ยนแปลง | 请求合并更改 |
/diff | Interactive change viewer | ดูการเปลี่ยนแปลงแบบโต้ตอบ | 交互式查看更改 |
--worktree | Isolated git environment | สภาพแวดล้อม git ที่แยกจากกัน | 隔离的 git 环境 |
Grow a real branch graph, then prove you know the workflow order. / สร้างกราฟ git แล้วเรียงลำดับขั้นตอนให้ถูก / 构建 git 分支图,再排出正确的流程顺序
Build a git history. Commit, branch, switch, merge — watch the graph grow.