git-workflow
Fungsinya
Panduan ini mengajarkan praktik terbaik dalam menggunakan Git, sistem version control. Panduan ini menjelaskan cara mengatur riwayat kode, menulis pesan yang jelas untuk setiap perubahan, dan memilih cara kerja terbaik dalam tim.
Kapan dipakai
- βSaat memulai proyek baru dan menentukan cara kode akan dikelola.
- βSaat memutuskan strategi pengorganisasian kode (seperti GitHub Flow atau GitFlow) yang akan dipakai.
- βSaat menulis pesan untuk menjelaskan perubahan pada kode.
Link skill
https://github.com/affaan-m/ECC/blob/main/pi/core/skills/git-workflow/SKILL.mdSalin 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
Untuk Claude Code, Codex, atau Cursor: jalankan di folder proyek, lalu skill langsung terpasang.
Unduh SKILL.md lalu taruh di folder skill agen Anda.
Contoh permintaan ke AI
βBagaimana cara mengatur proyek saya menggunakan Git Flow?β
5 skill baru setiap minggu. 1 menit baca.
Cara kerjanya
Panduan ini menawarkan beberapa model pengorganisasian, seperti GitHub Flow (sederhana dan cocok untuk sebagian besar kasus) dan GitFlow (lebih kompleks, untuk proyek dengan rilis terjadwal). Panduan ini juga mengajarkan cara menulis pesan 'commit' dengan pola yang jelas.
Konten teknis (SKILL.md asli)
Teks asli dari pembuat, dalam bahasa Inggris, langsung dari GitHub.
Git Workflow Patterns
Best practices for Git version control, branching strategies, and collaborative development.
When to Activate
- Setting up Git workflow for a new project
- Deciding on branching strategy (GitFlow, trunk-based, GitHub flow)
- Writing commit messages and PR descriptions
- Resolving merge conflicts
- Managing releases and version tags
- Onboarding new team members to Git practices
Branching Strategies
GitHub Flow (Simple, Recommended for Most)
Best for continuous deployment and small-to-medium teams.
main (protected, always deployable)
β
βββ feature/user-auth β PR β merge to main
βββ feature/payment-flow β PR β merge to main
βββ fix/login-bug β PR β merge to main
Rules:
mainis always deployable- Create feature branches from
main - Open Pull Request when ready for review
- After approval and CI passes, merge to
main - Deploy immediately after merge
Trunk-Based Development (High-Velocity Teams)
Best for teams with strong CI/CD and feature flags.
main (trunk)
β
βββ short-lived feature (1-2 days max)
βββ short-lived feature
βββ short-lived feature
Rules:
- Everyone commits to
mainor very short-lived branches - Feature flags hide incomplete work
- CI must pass before merge
- Deploy multiple times per day
GitFlow (Complex, Release-Cycle Driven)
Best for scheduled releases and enterprise projects.
main (production releases)
β
βββ develop (integration branch)
β
βββ feature/user-auth
βββ feature/payment
β
βββ release/1.0.0 β merge to main and develop
β
βββ hotfix/critical β merge to main and develop
Rules:
maincontains production-ready code onlydevelopis the integration branch- Feature branches from
develop, merge back todevelop - Release branches from
develop, merge tomainanddevelop - Hotfix branches from
main, merge to bothmainanddevelop
When to Use Which
| Strategy | Team Size | Release Cadence | Best For |
|---|---|---|---|
| GitHub Flow | Any | Continuous | SaaS, web apps, startups |
| Trunk-Based | 5+ experienced | Multiple/day | High-velocity teams, feature flags |
| GitFlow | 10+ | Scheduled | Enterprise, regulated industries |
Commit Messages
Conventional Commits Format
<type>(<scope>): <subject>
[optional body]
[optional footer(s)]
Types
| Type | Use For | Example |
|---|---|---|
feat |
New feature | feat(auth): add OAuth2 login |
fix |
Bug fix | fix(api): handle null response in user endpoint |
docs |
Documentation | docs(readme): update installation instructions |
style |
Formatting, no code change | style: fix indentation in login component |
refactor |
Code refactoring | refactor(db): extract connection pool to module |
test |
Adding/updating tests | test(auth): add unit tests for token validation |
chore |
Maintenance tasks | chore(deps): update dependencies |
perf |
Performance improvement | perf(query): add index to users table |
ci |
CI/CD changes | ci: add PostgreSQL service to test workflow |
revert |
Revert previous commit | revert: revert "feat(auth): add OAuth2 login" |
Good vs Bad Examples
# BAD: Vague, no context
git commit -m "fixed stuff"
git commit -m "updates"
git commit -m "WIP"
# GOOD: Clear, specific, explains why
git commit -m "fix(api): retry requests on 503 Service Unavailable
The external API occasionally returns 503 errors during peak hours.
Added exponential backoff retry logic with max 3 attempts.
Closes #123"
Commit Message Template
Create .gitmessage in repo root:
# <type>(<scope>): <subject>
# # Types: feat, fix, docs, style, refactor, test, chore, perf, ci, revert
# Scope: api, ui, db, auth, etc.
# Subject: imperative mood, no period, max 50 chars
#
# [optional body] - explain why, not what
# [optional footer] - Breaking changes, closes #issue
Enable with: git config commit.template .gitmessage
Merge vs Rebase
Merge (Preserves History)
# Creates a merge commit
git checkout main
git merge feature/user-auth
# Result:
# * merge commit
# |\
# | * feature commits
# |/
# * main commits
Use when:
- Merging feature branches into
main - You want to preserve exact history
- Multiple people worked on the branch
β¦
Pertanyaan umum
Apa itu 'commit'?
'Commit' seperti 'save' di proyek Anda, yang mencatat sekumpulan perubahan pada kode di titik waktu tertentu.
Apa perbedaan 'merge' dan 'rebase'?
'Merge' menggabungkan riwayat dua branch dan membuat catatan kapan keduanya digabungkan. 'Rebase' menyusun ulang perubahan Anda agar terlihat seolah dibuat setelah perubahan terbaru dari branch lain, sehingga riwayatnya lebih lurus.
Mengapa menggunakan 'Conventional Commits'?
Ini membantu memahami dengan cepat apa yang dilakukan setiap perubahan (fitur baru, perbaikan bug, dan sebagainya) dan memudahkan otomatisasi, seperti membuat catatan rilis.
Detail
Deskripsi asli dari pembuat
Git workflow patterns including branching strategies, commit conventions, keeping history clean and readable, tidying local commits before merging, merge vs rebase, conflict resolution, and collaborative development best practices for teams of all sizes. Use when choosing a branching strategy, writing commit conventions, cleaning up history before a pull request, deciding merge versus rebase, or r
repo: affaan-m/ECC
Popularitas
- Bintang GitHub
- 280k
- Peringkat
- #185
- Lisensi
- MIT
- Diperbarui
- 15/10/2026
Komentar
- β¦
Skill lain dari repositori ini
accessibility
280kMembantu agent Anda membuat antarmuka yang ramah untuk semua orang. Memastikan website dan aplikasi tetap bisa dipakai penyandang disabilitas, seperti tunanetra.
agent-architecture-audit
280kMembuat agent Anda memeriksa apakah semuanya berjalan dengan benar. Agent akan menemukan dan memperbaiki masalah pada sistem AI agar bekerja sesuai harapan.
agent-eval
280kMembantu agent Anda membandingkan berbagai alat coding AI. Mengukur mana yang lebih cepat, lebih murah, dan lebih andal untuk tugas tertentu.
agent-harness-construction
280kMembuat agent Anda lebih memahami cara menyelesaikan tugas. Agent mengoptimalkan alat dan instruksi yang digunakan agar peluang berhasilnya lebih besar.
Skill serupa
openclaw-update
394kMembantu agent Anda memperbarui OpenClaw Gateway yang sudah ada, dengan memilih metode pembaruan yang sesuai cara pemasangannya dan menjaga sesi Anda tetap berjalan.
diagnose-gateway
394kMembantu agent Anda mencari tahu mengapa OpenClaw Gateway gagal dengan memeriksa pengaturan, channel, dan port tanpa mengubah apa pun.
crabbox-apps
394kMembantu agent Anda membuka dan menjalankan aplikasi di mesin cloud sementara, lalu menampilkan tampilannya di panel samping chat Anda.