GITHUB 101 · สอนใช้ Git + GitHub ภาษาไทย

มี code
บอก Git

แพลตฟอร์มเก็บ code + version control + ชุมชน dev ใหญ่ที่สุดในโลก
เริ่มใช้ได้ใน 5 นาที แม้ไม่เคยเขียนโปรแกรมมาก่อน

100M+ devs 420M+ repos ฟรี ตลอดชีพ
~/my-project — zsh ✓ live
# เริ่มจากศูนย์ → push ไป GitHub ใน 4 คำสั่ง $ git init Initialized empty Git repository $ git add . $ git commit -m "first commit" [main (root-commit) a1b2c3d] 1 file changed, 24 insertions(+) $ git remote add origin [email protected]:me/proj.git $ git push -u origin main ✓ Enumerating objects: 3, done. ✓ Writing objects: 100% (3/3), 240 bytes ✓ To github.com:me/proj.git a1b2c3d..e9f8a7b main -> main $
01 — เริ่มต้นที่ไหนดี

3 จุดเริ่มต้น เลือกตามระดับ

ไม่ว่าคุณจะเป็นมือใหม่หรือ dev มือโปร — มีทางให้คุณเสมอ

🌱 ⏱ 5 นาที

มือใหม่

ยังไม่เคยใช้ Git เลย เริ่มจากศูนย์ ติดตั้ง + ใช้คำสั่งแรกใน 5 นาที

เริ่มจากตรงนี้ →
⏱ 10 นาที

Dev ที่ใช้แล้ว

รู้ Git แล้ว แต่อยากเก่งขึ้น branch, rebase, conflict, PR workflow

ข้ามไปขั้นกลาง →
👥 ⏱ 8 นาที

ทำงานเป็นทีม

PR, code review, CI/CD, GitHub Actions สำหรับทีม dev ที่ scale ได้

ทำงานเป็นทีม →
02 — แนวคิด

GitHub ทำงานยังไง?
แค่ 3 ขั้น

เข้าใจทั้งหมดใน 30 วินาที

💻 1

Local

เขียน + commit บนเครื่องตัวเอง ไม่ต้องมีเน็ต

+
☁️ 2

Remote

push ไป GitHub — backup + แชร์ทีมได้

+
🚀 3

Deploy

clone ไป server production / staging / DR

💡 Pro Tip

ใช้ git status ดูว่ามีอะไรเปลี่ยนแปลง git log --oneline ดูประวัติ — 2 คำสั่งนี้ใช้บ่อยที่สุดในชีวิต dev

03 — ใช้กับใครได้บ้าง

GitHub ไม่ได้มีแค่สำหรับ dev

จริงๆ แล้วทุกคนที่ทำงานกับไฟล์ได้ประโยชน์หมด

👨‍💻

Solo Dev

เก็บ portfolio, backup อัตโนมัติ, ใช้เป็น resume

PORTFOLIO
👥

Team Lead

PR review, branch policy, CI/CD pipeline

COLLABORATION
🎓

นักเรียน/นักศึกษา

เรียนจาก code คนอื่น, contribute open source

LEARNING
🚀

Startup

ship เร็ว, deploy อัตโนมัติ, scale ทีมได้

SPEED
📚

Writer / Author

เก็บ manuscript + version + collaborate กับ editor

CONTENT
🏢

Enterprise

security, governance, audit trail, SSO

SCALE
04 — คำสั่ง

Git Cheatsheet
จำแค่ 8 คำสั่งก็ใช้ได้แล้ว

พิมพ์ใน terminal — เรียงตามลำดับที่ใช้บ่อย

01 · start
git init
เริ่ม repo ใหม่ใน folder ปัจจุบัน
02 · stage
git add .
เพิ่มไฟล์ทั้งหมดเข้า staging area
03 · save
git commit -m "message"
save snapshot พร้อมข้อความอธิบาย
04 · upload
git push
ส่ง commit ไปยัง GitHub
05 · download
git pull
ดึง update ล่าสุดจาก GitHub
06 · copy
git clone url
copy repo ทั้งหมดลงเครื่อง
07 · check
git status
ดูว่ามีอะไรเปลี่ยนแปลง
08 · history
git log --oneline
ดูประวัติ commit ทั้งหมด

💡 Pro Tip

ถ้าจะทำงานเป็นทีม เพิ่ม git branch + git checkout -b feature/x + git merge เข้าไปอีก 3 คำสั่ง ก็ครบ workflow แล้ว

05 — Visual Workflow

Visual Workflow
Guide

ดูแบบ infographic เต็มๆ ในหน้าแยก — interactive SVG tree + live git log + pitfalls

เปิดหน้า Workflow →
06 — เริ่มเลย

พร้อม push แรก
ของคุณหรือยัง?

สมัครฟรี ไม่ต้องใช้บัตรเครดิต ใช้ได้ทันที

สมัคร GitHub ฟรี เริ่มเรียนใหม่อีกรอบ