โปรแกรมเมอร์ GitHub มักเพิ่ม Screenshot หรือ Animated GIF ใน Pull Requests เทคนิคเหล่านี้ดึงดูดสายตามากกว่าให้อ่าน Plain Text หลายบรรทัด Screenshot แสดง Visual Changes/Photos Inline GIF Demo Process Flows และ Mouse Cursor Motion
บทช่วยสอนนี้: เพิ่ม Screenshot และ GIF Animation ใน GitHub Pull Requests ตั้งแต่ต้น แม้ไม่เคยใช้ GitHub ก็ทำได้
1. เพิ่ม Repository และ Branch ใหม่
มือใหม่ GitHub: สร้างบัญชีตามขั้นตอน
คลิก "+" มุมขวาบน -> New Repository -> ✅ "Initialize this repository with a README"
ต่อไป: Add Branch ด้วย Dropdown Menu ตัวอย่าง: Branch "Guten-tag" เพิ่มใน Repository "Hola-World"
วัตถุประสงค์ Branch: ช่วย Developer ทำ Features/Bug Fixes แยกจาก Master Production Branch
2. สร้าง Screenshot หรือ Animation
Screenshot: ต้อง Screen Capture Software Windows 10: Snip & Sketch, Snipping Tool (ดี/ง่าย)
GIF Animation: ต้อง Video Screen Capture Tool แนะนำ Recordit: ง่ายมาก สำหรับ Screencast เร็ว ดาวน์โหลด Windows/macOS ตรงๆ
ติดตั้ง -> Record หน้าจอไม่กี่วินาที ด้วย Record Button Screencasts ล่าสุดมองจาก System Tray -> เปิดใน Browser
GitHub PR ไม่อนุญาต Video (MP4) -> แปลงเป็น GIF รองรับไฟล์จำกัด: JPG, JPEG, GIF, PNG, DOCX, PPTX, PDF, TXT, XLSX, ZIP แปลง MP4 -> GIF ด้วย Ezgif หรือ Online Tools อื่นๆ
GIF ตัวอย่าง: Demo การเพิ่ม Branch ใหม่ใน GitHub Repository ด้วย GitHub Desktop App
3. เพิ่ม Screenshot/Animation ใน GitHub Pull Requests
กลับไป Branch ที่สร้าง -> "Pull requests" -> Edit Pull Request Data จาก 3-dot Menu
ใน Editor Mode -> Attach Screenshot/GIF จาก "Attach files" First Commit -> "Commit" มิฉะนั้น -> "Update comment"
Screenshot และ Animation เพิ่มสำเร็จใน Branch -> Repository
GitHub = Collaboration กับ Developer อื่น หากชอบการเปลี่ยนแปลง -> Merge Upstream เข้า Repository ของพวกเขา ด้วย "Merge Pull Request"
Animation = วิธีดึงดูดความสนใจ Developer ใน Community GitHub จบบทช่วยสอน: เรียนรู้เพิ่ม Screenshot/GIF ใน Repo/Branches ไม่ชอบ GitHub? ดู GitHub Alternatives ของเรา