# Git

> การจัดการ Git และแพลตฟอร์มโฮสต์โค้ด — GitHub, GitLab, Codeberg, Forgejo ไม่มีอุปสรรค ติดตั้ง x-cmd แล้วจัดการ repo ได้จากเทอร์มินัล ใช้เมื่อเจอคำว่า "git", "github", "gitlab", "repo", "pull request", "code hosting"

- Skill: `x-cmd/git-17` (Agent Skill)
- Install (CLI): `npx get-skill add x-cmd/git-17`
- Raw SKILL.md: https://api.skillmd.com/api/skills/x-cmd/git-17/raw
- Safety review: pending
- Works with: Claude Code, Claude.ai, OpenAI Codex
- Category: Coding & Dev Tools
- Author: x-cmd (https://skillmd.com/u/x-cmd)
- Updated: 2026-11-15
- Page: https://skillmd.com/skills/x-cmd/git-17

---



# git — skill0

จัดการ Git repo และแพลตฟอร์มโฮสต์โค้ดจากบรรทัดคำสั่ง

## เริ่มใช้งาน

```bash
# ติดตั้ง x-cmd
eval "$(curl https://get.x-cmd.com)"

# จัดการ repo บน GitHub
x gh repo list
x gh repo clone owner/repo

# สร้าง pull request
x gh pr create --title "Fix bug" --body "Description"

# จัดการ git hooks
x git hook
```

## มีอะไรให้ใช้บ้าง

| คำสั่ง | แพลตฟอร์ม | คำอธิบาย |
|---------|----------|-------------|
| `x gh` | GitHub | เชื่อมต่อกับ GitHub CLI แบบครบถ้วน |
| `x gl` | GitLab | จัดการโปรเจกต์บน GitLab |
| `x cb` | Codeberg | เชื่อมต่อกับ Codeberg |
| `x git hook` | ในเครื่อง | จัดการ git hooks |

## skill0 นี้จะเติบโตขึ้น

เริ่มจากพื้นฐานของ GitHub จะเพิ่ม:
- เวิร์กโฟลว์ของ GitLab
- แนวปฏิบัติที่ดีสำหรับการโฮสต์โค้ด
- คู่มือย้าย repo
- เคล็ดลับการผสานรวมกับ CI/CD

## ได้ประสบการณ์เต็มรูปแบบ

หลังติดตั้ง x-cmd แล้ว ใช้ `x git --help` เพื่อดูตัวเลือกทั้งหมด

## ที่เกี่ยวข้อง

- [repo](../repo/SKILL.md) — ค้นพบ/จัดการ repo ผ่าน x repo
