Langsung ke konten
Skillpedia
Pemrograman umum17k · #10793

squash-commits

Fungsinya

Skill ini menata ulang commit di cabang Anda saat ini menjadi sekumpulan kecil commit yang logis. Skill ini untuk pengembang yang menginginkan riwayat yang bersih sebelum membagikan pekerjaan mereka.

Kapan dipakai

  • ✓Saat cabang Anda punya banyak commit kecil atau berantakan dan Anda ingin riwayat yang lebih bersih.
  • ✓Saat Anda ingin mengelompokkan perubahan yang berkaitan menjadi beberapa commit yang bermakna sebelum membuka pull request.
  • ✓Saat Anda perlu menghapus commit merge dari main yang sudah masuk ke cabang Anda.

Link skill

https://github.com/pipecat-ai/pipecat/blob/main/.claude/skills/squash-commits/SKILL.md

Salin lalu tempelkan ke AI Anda (Claude, ChatGPT, atau Cursor) dan minta AI mengikuti instruksinya.

Cara pakai

Cara paling mudah: salin pesan ini dan tempelkan ke AI Anda. AI akan membaca skill dan mengikuti instruksinya.

Pesan siap tempel

Gunakan skill ini untuk membantu saya: https://github.com/pipecat-ai/pipecat/blob/main/.claude/skills/squash-commits/SKILL.md Baca file SKILL.md di link tersebut dan ikuti instruksinya untuk tugas saya.
Mau AI Anda menemukan skill seperti ini sendiri?Pasang MCP Skillpedia gratis: cukup satu baris, dan AI mencari di antara 15.000+ skill sebelum tiap tugas.Pasang dalam 1 menit →

Contoh permintaan ke AI

“Bisakah Anda merapikan commit di cabang saya menjadi beberapa commit yang jelas tanpa mengubah kode apa pun?”

5 skill baru setiap minggu. 1 menit baca.

Cara kerjanya

Agent memastikan pekerjaan Anda sudah tersimpan, membuat salinan cadangan cabang, dan mengatur ulang commit sambil mempertahankan setiap perubahan. Kemudian agent mengusulkan pengelompokan dan meminta konfirmasi Anda sebelum membuat commit.

Konten teknis (SKILL.md asli)

Teks asli dari pembuat, dalam bahasa Inggris, langsung dari GitHub.

Reorganize the commits on the current branch into a small number of logical commits. Do NOT change any file content — only the commit structure changes.

Instructions

1. Safety check

git status --short

If there are uncommitted changes, stop and tell the user to commit or stash them first.

2. Inspect the branch

git log main..HEAD --oneline
git diff main..HEAD --name-only

List every file changed vs main and every commit on the branch (excluding merge commits from main).

3. Create a backup branch

git branch backup/<current-branch-name>

Tell the user the backup exists so they can recover if needed.

4. Soft-reset to main and unstage everything

git reset --soft main
git restore --staged .

All branch changes are now in the working tree, unstaged. No content has changed.

5. Plan the logical groups

Read the changed files and the original commit messages to understand what the work covers. Group related files into logical commits. Typical groups:

  • Core feature or fix (new source files + modified core files)
  • Secondary features or fixes (each as its own commit if distinct)
  • Refactoring or renames
  • Tests
  • Changelogs / docs

Use the changelog files (if any) as a strong hint — each changelog entry often maps to one commit.

Present the proposed grouping to the user and ask for confirmation before committing.

6. Commit in logical groups

For each group, stage only the relevant files and commit with a clear message following the project's conventions:

git add <file1> <file2> ...
git commit -m "..."

Use conventional commit prefixes if the project uses them (feat:, fix:, refactor:, test:, chore:).

7. Verify

git log main..HEAD --oneline
git diff main..HEAD --name-only
git status --short

Confirm:

  • Commit count is small and each message is meaningful
  • The set of changed files vs main is identical to before
  • Working tree is clean

8. Remind about force-push

The branch history has been rewritten. Tell the user they will need to git push --force-with-lease when they are ready to update the remote. Do NOT push automatically.

Rules

  • Never change file contents. If you find yourself editing a file, stop.
  • Never skip the backup branch step.
  • Never force-push without explicit user instruction.
  • If any step fails or the result looks wrong, tell the user and suggest restoring from the backup: git reset --hard backup/<branch-name>.
Pertanyaan umum

Apakah ini akan mengubah kode saya?

Tidak. Skill ini hanya dimaksudkan untuk mengubah cara commit diatur, bukan isi berkas apa pun.

Apakah ada cara untuk membatalkannya?

Ada. Skill ini membuat cabang cadangan terlebih dahulu, sehingga Anda bisa kembali ke commit semula jika diperlukan.

Apakah saya perlu mengonfirmasi pengelompokannya?

Ya. Agent menampilkan kelompok commit yang diusulkan dan meminta persetujuan Anda sebelum membuat commit apa pun.

Detail

Deskripsi asli dari pembuat

Reorganize messy branch commits into a small set of logical, meaningful commits without changing any content. Drops merge-from-main commits. Safe: creates a backup branch first.

repo: pipecat-ai/pipecat

Popularitas

Bintang GitHub
17k
Peringkat
#10793
Lisensi
BSD-2-Clause
Diperbarui
2/11/2026

Apakah skill ini berguna?

0

Masuk untuk memberi suara.

Komentar

  • …

Skill lain dari repositori ini

Skill serupa