🎯 GitHub Copilot คืออะไร?
What is GitHub Copilot & AI-Assisted Coding?
🇹🇭 ภาษาไทย
GitHub คือแพลตฟอร์มสำหรับจัดเก็บและจัดการโค้ดโปรแกรม นักพัฒนาทั่วโลกใช้ GitHub เพื่อทำงานร่วมกันบนโปรเจกต์ซอฟต์แวร์
GitHub Copilot คือเครื่องมือ AI ที่ช่วยเขียนโค้ดให้คุณ มัน ถูกฝึก (was trained) จากโค้ดหลายล้านบรรทัด และสามารถ แนะนำโค้ด (suggest code) ให้คุณขณะพิมพ์
เมื่อ AI ถูกใช้ร่วมกับ GitHub ขั้นตอนการเขียนโค้ดจะ ถูกเร่งให้เร็วขึ้น — commit messages ถูกเขียนโดย AI, โค้ดถูกตรวจสอบโดยอัตโนมัติ, และ bugs ถูกพบได้เร็วขึ้น
🇬🇧 English
GitHub is a platform for storing and managing code. Developers around the world use GitHub to collaborate on software projects.
GitHub Copilot is an AI tool that helps you write code. It was trained on millions of lines of code and can suggest code as you type.
When AI is used with GitHub, the coding process is accelerated — commit messages are written by AI, code is reviewed automatically, and bugs are found faster.
🌟 Fun Facts — ข้อเท็จจริงน่าสนใจ
- Over 100 million developers are registered on GitHub — มีนักพัฒนากว่า 100 ล้านคนบน GitHub!
- GitHub Copilot was created by GitHub and OpenAI together — Copilot ถูกสร้างโดย GitHub และ OpenAI ร่วมกัน
- More than 1 billion suggestions have been accepted by Copilot users — มีการยอมรับคำแนะนำมากกว่า 1 พันล้านครั้ง
- The name "Git" was chosen by Linus Torvalds — the creator of Linux — ชื่อ "Git" ถูกเลือกโดย Linus Torvalds ผู้สร้าง Linux
🇹🇭 ทำไมต้องเรียน AI + GitHub?
- GitHub ถูกใช้โดยบริษัทเทคโนโลยีทุกแห่ง
- Commit messages ถูกเขียนเป็นภาษาอังกฤษ — ฝึกภาษาได้!
- โค้ดถูกตรวจสอบ (reviewed) ด้วย AI ได้เร็วขึ้น
- เป็นทักษะสำคัญที่ถูกต้องการในตลาดงาน
🇬🇧 Why Learn AI + GitHub?
- GitHub is used by every tech company in the world
- Commit messages are written in English — great practice!
- Code is reviewed faster with AI assistance
- It is a skill that is required in the job market
🧪 Section Check — ตรวจสอบความเข้าใจ
GitHub & AI Basics — พื้นฐาน GitHub และ AI
GitHub Copilot ______ on millions of lines of code before it could suggest code to developers.
GitHub Copilot ______ จากโค้ดหลายล้านบรรทัดก่อนที่จะแนะนำโค้ดให้นักพัฒนาได้
Which sentence correctly uses passive voice to describe what happens on GitHub?
ประโยคไหนใช้ passive voice ถูกต้องเพื่ออธิบายสิ่งที่เกิดขึ้นบน GitHub?
What is the main advantage of using AI with GitHub?
ข้อดีหลักของการใช้ AI กับ GitHub คืออะไร?
📚 คำศัพท์สำคัญ
Key Vocabulary
โฟลเดอร์ที่ไฟล์โปรเจกต์ถูกจัดเก็บและติดตามโดย Git
การบันทึกสแนปช็อตของการเปลี่ยนแปลง แต่ละ commit ถูกบันทึกพร้อมข้อความ
การอัปโหลด commit จากคอมพิวเตอร์ของคุณไปยัง GitHub
การดาวน์โหลดการเปลี่ยนแปลงจาก GitHub มายังคอมพิวเตอร์ของคุณ
เวอร์ชันแยกของโค้ดที่ฟีเจอร์ใหม่ถูกพัฒนาโดยไม่กระทบโค้ดหลัก
การรวมการเปลี่ยนแปลงจาก branch หนึ่งเข้ากับอีก branch
คำขอรวมการเปลี่ยนแปลงของคุณเข้าสู่ branch หลัก ถูกตรวจสอบโดยนักพัฒนาคนอื่น
กระบวนการที่โค้ดถูกตรวจสอบโดยคนอื่นหรือ AI ก่อนที่จะถูกยอมรับ
ผู้ช่วย AI ที่สร้างโดย GitHub ช่วยเขียนโค้ดโดยแนะนำการเติมเต็ม
คำแนะนำหรือไอเดียที่เสนอโดย AI คำแนะนำโค้ดถูกแสดงขณะคุณพิมพ์
เมื่อ AI เติมโค้ดหรือข้อความให้อัตโนมัติขณะที่คุณพิมพ์
ระบบที่ติดตามการเปลี่ยนแปลงทั้งหมดที่ทำกับไฟล์ ทุกการเปลี่ยนแปลงถูกบันทึก
🧪 Section Check — ตรวจสอบความเข้าใจ
Vocabulary & Passive Voice — คำศัพท์และ Passive Voice
A ______ is a saved snapshot of your changes. Each one ______ with a message.
______ คือสแนปช็อตที่บันทึกการเปลี่ยนแปลงของคุณ แต่ละอัน____พร้อมข้อความ
What does "push" mean in GitHub?
"push" ใน GitHub หมายถึงอะไร?
New features ______ on a separate branch without affecting the main code.
ฟีเจอร์ใหม่______บน branch แยกโดยไม่กระทบโค้ดหลัก
📖 ไวยากรณ์ในบริบท GitHub
Grammar in Context: Passive Voice
🔤 Passive Voice: be + past participle (V3)
Passive Voice (ประโยคถูกกระทำ) ใช้เมื่อเราต้องการเน้น สิ่งที่ถูกกระทำ มากกว่าผู้กระทำ เหมือนคำว่า "ถูก" ในภาษาไทย
โครงสร้าง: Subject + be + past participle (V3) + (by + ผู้กระทำ)
Present: is/am/are + V3 | Past: was/were + V3 | Present Perfect: has/have been + V3
Active → Passive (Present):
Active: AI writes the code.
✅ Passive: The code is written by AI.
โค้ดถูกเขียนโดย AI
Active → Passive (Past):
Active: The developer created the repository yesterday.
✅ Passive: The repository was created yesterday.
repository ถูกสร้างเมื่อวาน
Active → Passive (Present Perfect):
Active: The team has fixed the bug.
✅ Passive: The bug has been fixed.
บั๊กถูกแก้ไขแล้ว
❌ The code is write by AI. → ✅ The code is written by AI.
ต้องใช้ past participle (V3) หลัง be เสมอ ไม่ใช่ verb ปกติ
❌ The bug has been fix. → ✅ The bug has been fixed.
Present perfect passive: has/have + been + V3
💡 Grammar Tip — เคล็ดลับไวยากรณ์
Thai: Passive voice เหมือนการใช้ "ถูก" ในภาษาไทย: "โค้ดถูกเขียน" = "The code is written". จำง่ายๆ: be + V3 เสมอ!
English: Passive voice is very common in tech documentation: "The file is saved", "The bug was found", "Changes have been pushed". The doer (by...) can be omitted.
🇹🇭 สรุปโครงสร้าง Passive Voice
- Present passive: is/am/are + V3 — "The code is reviewed."
- Past passive: was/were + V3 — "The repo was created."
- Present perfect passive: has/have been + V3 — "The bug has been fixed."
- Active → Passive: ย้าย object มาเป็น subject แล้วใช้ be + V3
- by + ผู้กระทำ: ใส่หรือไม่ใส่ก็ได้ ถ้าไม่สำคัญ
🇬🇧 Passive Voice Summary
- Present: is/am/are + V3 — "Code is pushed to GitHub."
- Past: was/were + V3 — "The branch was merged."
- Present Perfect: has/have been + V3 — "The PR has been approved."
- Active → Passive: Move the object to subject position, add be + V3
- "by" agent: Optional — include only when the doer is important
🧪 Section Check — ตรวจสอบความเข้าใจ
Passive Voice Grammar — ไวยากรณ์ Passive Voice
The repository ______ yesterday by the developer.
Repository ______เมื่อวานโดยนักพัฒนา
Which sentence is INCORRECT passive voice?
ประโยคไหนใช้ passive voice ผิด?
The bug ______ by the team. (Present perfect passive)
บั๊ก______โดยทีม (Present perfect passive)
🚀 เริ่มต้นใช้งาน
Getting Started: Setting Up GitHub with AI Tools
🇹🇭 สิ่งที่ต้องเตรียม
- คอมพิวเตอร์ที่เชื่อมต่ออินเทอร์เน็ต
- บัญชี GitHub (สร้างฟรีที่ github.com)
- Text editor เช่น VS Code (ถูกแนะนำ)
- AI chatbot เช่น ChatGPT หรือ Claude
🇬🇧 What You Need
- A computer with internet access
- A GitHub account (created free at github.com)
- A text editor like VS Code (recommended)
- An AI chatbot like ChatGPT or Claude
1สร้างบัญชี GitHub — Create a GitHub Account
2สร้าง Repository แรก — Create Your First Repository
3ใช้ AI เขียน README — Use AI to Write a README
4ทำ Commit แรก — Make Your First Commit
5ใช้ AI ตรวจสอบโค้ด — Use AI for Code Review
💡 Pro Tip — เคล็ดลับมือโปร
Thai: บอก AI ว่า "Please write the commit message in passive voice" แล้ว AI จะเขียน เช่น "A new feature was added" แทน "I added a new feature" — ฝึก passive voice ไปในตัว!
English: Ask AI to write commit messages in passive voice: "A new feature was added" instead of "I added a new feature" — practice grammar while coding!
🛠️ โปรเจกต์ลงมือทำ
Hands-On Project: Create a Repo & Use AI to Review Code
Create a Repository & AI Code Review — สร้าง Repo และใช้ AI ตรวจโค้ด 🌱 Easy
เป้าหมาย: สร้าง GitHub repository ใหม่ ใช้ AI เขียน README และ commit message แล้วให้ AI ตรวจสอบโค้ดโดยใช้ passive voice
ทำตามขั้นตอนอย่างน้อย 3 ข้อ แล้วบันทึกผลลัพธ์
Goal: Create a new GitHub repository, use AI to write a README and commit messages, then have AI review code using passive voice.
Complete at least 3 steps and record your results.
⚠️ Remember / จำไว้นะ
Thai: อย่าแชร์ข้อมูลส่วนตัว (เช่น รหัสผ่าน, API keys) บน GitHub! Repository สาธารณะ ถูกเห็นโดยทุกคน
English: Never share personal information (like passwords or API keys) on GitHub! Public repositories are seen by everyone.
🧪 Section Check — ตรวจสอบความเข้าใจ
Getting Started & Projects — เริ่มต้นและโปรเจกต์
The README ______ by AI and can be copied to your GitHub repository.
README ______โดย AI และสามารถคัดลอกไปยัง GitHub repository ของคุณได้
Why should you never share API keys on a public GitHub repository?
ทำไมไม่ควรแชร์ API keys บน GitHub repository สาธารณะ?
📊 คำสั่ง GitHub ที่ใช้บ่อย
Common GitHub Commands Reference
| Command / คำสั่ง | Description / คำอธิบาย | Passive Voice Example |
|---|---|---|
| git init | Create a new repository สร้าง repository ใหม่ |
"A new repo is initialized." |
| git add . | Stage all changes เตรียมการเปลี่ยนแปลงทั้งหมด |
"All files are added to staging." |
| git commit -m "msg" | Save changes with a message บันทึกการเปลี่ยนแปลงพร้อมข้อความ |
"Changes are committed." |
| git push | Upload to GitHub อัปโหลดไปยัง GitHub |
"Code is pushed to remote." |
| git pull | Download from GitHub ดาวน์โหลดจาก GitHub |
"Updates are pulled from remote." |
| git branch | Create/list branches สร้าง/แสดง branch |
"A new branch is created." |
| git merge | Combine branches รวม branch |
"Branches are merged together." |
| git clone | Copy a remote repository คัดลอก repository จากระยะไกล |
"The repo is cloned locally." |
🎯 สรุป
Summary
🇹🇭 สิ่งที่คุณได้เรียนรู้
- GitHub คืออะไรและ AI ช่วยเขียนโค้ดอย่างไร
- คำศัพท์สำคัญ: repository, commit, push, pull, branch, merge
- Passive Voice: be + V3 (is written, was created, has been fixed)
- การสร้าง repository และใช้ AI เขียน README
- การใช้ AI ตรวจสอบโค้ดบน GitHub
🇬🇧 What You Have Learned
- What GitHub is and how AI assists coding
- Key vocabulary: repository, commit, push, pull, branch, merge
- Passive Voice: be + V3 (is written, was created, has been fixed)
- How to create a repository and use AI to write a README
- How to use AI for code review on GitHub
🎉 ยินดีด้วย! / Congratulations!
บทเรียน Week 5 ถูกเรียนจบแล้ว!
The Week 5 lesson has been completed! New vocabulary has been learned and passive voice has been practiced! 🐙