<< All versions
Skill v1.0.1
currentLLM-judged scan90/100gabrielmoreira/agent-skills-mirror/git-workflow
+1 new
──Details
PublishedOctober 20, 2026 at 12:43 AM
Content Hashsha256:37fd894a71367262...
Git SHA33c6854c5679
Bump Typepatch
──Files
Files (1 file, 6.1 KB)
SKILL.md6.1 KBactive
SKILL.md · 305 lines · 6.1 KB
version: "1.0.1" name: git_workflow router_kit: FullStackKit description: Branch stratejisi, commit conventions, merge conflict çözümü ve Git best practices rehberi. metadata: skillport: category: development tags: [architecture, automation, best practices, clean code, coding, collaboration, compliance, debugging, design patterns, development, documentation, efficiency, git, git workflow, optimization, productivity, programming, project management, quality assurance, refactoring, software engineering, standards, testing, utilities, version control, workflow] - workflow
🌿 Git Workflow
Branch stratejisi, commit conventions ve Git best practices rehberi.
📋 İçindekiler
1. Branching Stratejileri
Git Flow
main (production)└── develop├── feature/user-auth├── feature/payment└── release/v1.2.0└── hotfix/critical-bug
GitHub Flow (Önerilen - Basit)
main (always deployable)├── feature/add-login├── fix/button-style└── chore/update-deps
Branch Naming
bash
# Featurefeature/user-authenticationfeature/JIRA-123-add-payment# Bug Fixfix/login-redirect-issuebugfix/memory-leak# Hotfix (production)hotfix/critical-security-patch# Otherchore/update-dependenciesrefactor/auth-moduledocs/api-documentation
2. Commit Conventions
Conventional Commits
<type>[optional scope]: <description>[optional body][optional footer(s)]
Types
| Type | Açıklama | |
|---|---|---|
feat | Yeni özellik | |
fix | Bug düzeltme | |
docs | Dokümantasyon | |
style | Formatting (kod değişikliği yok) | |
refactor | Refactoring | |
perf | Performans iyileştirme | |
test | Test ekleme/düzeltme | |
chore | Build, CI, dependencies | |
ci | CI configuration | |
revert | Revert commit |
Örnekler
bash
feat(auth): add OAuth2 login supportfix(api): resolve null pointer in user endpointCloses #123refactor!: drop support for Node 14BREAKING CHANGE: Minimum Node version is now 18chore(deps): update lodash to 4.17.21
Commit Message Rules
✅ DOĞRU:- Imperative mood: "Add feature" (not "Added" or "Adds")- 50 karakter başlık limiti- Büyük harfle başla, nokta koyma- Açıklayıcı body (neden, nasıl)❌ YANLIŞ:- "Fixed stuff"- "WIP"- "asdfasdf"- "Updated code"
3. Merge vs Rebase
Merge
bash
# Feature branch'i main'e mergegit checkout maingit merge feature/user-auth# Merge commit oluşturur# History korunur
Rebase
bash
# Feature branch'i main üzerine rebasegit checkout feature/user-authgit rebase main# Linear history# Commit'ler yeniden yazılır
Ne Zaman Hangisi?
| Durum | Strateji | |
|---|---|---|
| Public/shared branch | Merge | |
| Local feature branch | Rebase | |
| Main'e feature merge | Squash merge | |
| Hotfix | Merge |
Squash Merge
bash
git checkout maingit merge --squash feature/user-authgit commit -m "feat(auth): add user authentication"
4. Conflict Resolution
Conflict Markers
<<<<<<< HEADCurrent branch content=======Incoming branch content>>>>>>> feature-branch
Resolution Steps
bash
# 1. Conflict'leri görgit status# 2. Dosyaları düzenle (markers kaldır)# 3. Çözümlenmiş dosyaları stagegit add <resolved-file># 4. Merge/rebase devamgit merge --continue# veyagit rebase --continue
VS Code ile
bash
# Accept Current Change# Accept Incoming Change# Accept Both Changes# Compare Changes
Abort
bash
git merge --abortgit rebase --abort
5. Useful Commands
History
bash
# Güzel loggit log --oneline --graph --all# Son 10 commitgit log -10 --oneline# Dosya historygit log --follow -p -- path/to/file
Undo
bash
# Son commit'i geri al (değişiklikleri koru)git reset --soft HEAD~1# Son commit'i tamamen geri algit reset --hard HEAD~1# Commit'i revert et (yeni commit oluştur)git revert <commit-hash># Staged dosyayı unstagegit restore --staged <file># Değişiklikleri geri algit restore <file>
Stash
bash
# Değişiklikleri saklagit stash# Mesajla saklagit stash push -m "WIP: feature X"# Stash listesigit stash list# Son stash'i uygulagit stash pop# Belirli stash'i uygulagit stash apply stash@{2}
Interactive Rebase
bash
# Son 3 commit'i düzenlegit rebase -i HEAD~3# Açılan editörde:pick abc1234 First commitsquash def5678 Second commit # Öncekiyle birleştirreword ghi9012 Third commit # Mesajı değiştir
Cherry Pick
bash
# Belirli commit'i algit cherry-pick <commit-hash># Birden fazlagit cherry-pick <hash1> <hash2>
Git Workflow v1.1 - Enhanced
🔄 Workflow
Aşama 1: Branching
- [ ] Strategy: Çoğu ekip için "Trunk Based Development" (kısa ömürlü feature branch'ler) kullan.
- [ ] Naming:
feat/fix/ön eklerini standartlaştır. - [ ] Lifetime: Branch ömrü 2 günü geçmemeli. Geçiyorsa parçala.
Aşama 2: Committing
- [ ] Atomic: Bir commit sadece bir şeyi değiştirmeli.
- [ ] Message:
feat(auth): add loginformatını (Conventional Commits) zorunlu tut. - [ ] Verification:
pre-commithook ile linter/test çalıştır.
Aşama 3: Merging
- [ ] Review: Code Owner onayı olmadan merge etme.
- [ ] Method: Geçmişi temiz tutmak için
Squash Mergetercih et. - [ ] Cleanup: Merge sonrası branch'i sil.
Kontrol Noktaları
| Aşama | Doğrulama | |
|---|---|---|
| 1 | Main branch her an deploy edilebilir (Green) durumda mı? | |
| 2 | git log --oneline okunduğunda bir hikaye anlatıyor mu? | |
| 3 | Conflict çözülürken kod kaybı yaşanma riski var mı? |