git_workflow
Branch stratejisi, commit conventions, merge conflict çözümü ve Git best practices rehberi.
npxskills add vuralserhat86/antigravity-agentic-skills--skill git_workflowLoading…
Branch stratejisi, commit conventions, merge conflict çözümü ve Git best practices rehberi.
npxskills add vuralserhat86/antigravity-agentic-skills--skill git_workflowLoading…
Branch stratejisi, commit conventions ve Git best practices rehberi.
main (production)
└── develop
├── feature/user-auth
├── feature/payment
└── release/v1.2.0
└── hotfix/critical-bug
main (always deployable)
├── feature/add-login
├── fix/button-style
└── chore/update-deps
# Feature
feature/user-authentication
feature/JIRA-123-add-payment
# Bug Fix
fix/login-redirect-issue
bugfix/memory-leak
# Hotfix (production)
hotfix/critical-security-patch
# Other
chore/update-dependencies
refactor/auth-module
docs/api-documentation
<type>[optional scope]: <description>
[optional body]
[optional footer(s)]
| 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 |
feat(auth): add OAuth2 login support
fix(api): resolve null pointer in user endpoint
Closes #123
refactor!: drop support for Node 14
BREAKING CHANGE: Minimum Node version is now 18
chore(deps): update lodash to 4.17.21
✅ 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"
# Feature branch'i main'e merge
git checkout main
git merge feature/user-auth
# Merge commit oluşturur
# History korunur
# Feature branch'i main üzerine rebase
git checkout feature/user-auth
git rebase main
# Linear history
# Commit'ler yeniden yazılır
| Durum | Strateji |
|---|---|
| Public/shared branch | Merge |
| Local feature branch | Rebase |
| Main'e feature merge | Squash merge |
| Hotfix | Merge |
git checkout main
git merge --squash feature/user-auth
git commit -m "feat(auth): add user authentication"
<<<<<<< HEAD
Current branch content
=======
Incoming branch content
>>>>>>> feature-branch
# 1. Conflict'leri gör
git status
# 2. Dosyaları düzenle (markers kaldır)
# 3. Çözümlenmiş dosyaları stage
git add <resolved-file>
# 4. Merge/rebase devam
git merge --continue
# veya
git rebase --continue
# Accept Current Change
# Accept Incoming Change
# Accept Both Changes
# Compare Changes
git merge --abort
git rebase --abort
# Güzel log
git log --oneline --graph --all
# Son 10 commit
git log -10 --oneline
# Dosya history
git log --follow -p -- path/to/file
# Son commit'i geri al (değişiklikleri koru)
git reset --soft HEAD~1
# Son commit'i tamamen geri al
git reset --hard HEAD~1
# Commit'i revert et (yeni commit oluştur)
git revert <commit-hash>
# Staged dosyayı unstage
git restore --staged <file>
# Değişiklikleri geri al
git restore <file>
# Değişiklikleri sakla
git stash
# Mesajla sakla
git stash push -m "WIP: feature X"
# Stash listesi
git stash list
# Son stash'i uygula
git stash pop
# Belirli stash'i uygula
git stash apply stash@{2}
# Son 3 commit'i düzenle
git rebase -i HEAD~3
# Açılan editörde:
pick abc1234 First commit
squash def5678 Second commit # Öncekiyle birleştir
reword ghi9012 Third commit # Mesajı değiştir
# Belirli commit'i al
git cherry-pick <commit-hash>
# Birden fazla
git cherry-pick <hash1> <hash2>
Git Workflow v1.1 - Enhanced
feat/ fix/ ön eklerini standartlaştır.feat(auth): add login formatını (Conventional Commits) zorunlu tut.pre-commit hook ile linter/test çalıştır.Squash Merge tercih et.| 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ı? |
| Test ekleme/düzeltme |
chore | Build, CI, dependencies |
ci | CI configuration |
revert | Revert commit |
Create or update AgentSkills. Use when designing, structuring, or packaging skills with scripts, references, and assets.
Create or update AgentSkills. Use when designing, structuring, or packaging skills with scripts, references, and assets.
Set up and use 1Password CLI (op). Use when installing the CLI, enabling desktop app integration, signing in (single or multi-account), or reading/injecting/running secrets via op.
CLI to manage emails via IMAP/SMTP. Use `himalaya` to list, read, write, reply, forward, search, and organize emails from the terminal. Supports multiple accounts and message composition with MML (MIME Meta Language).
Create or update AgentSkills. Use when designing, structuring, or packaging skills with scripts, references, and assets.
Create or update AgentSkills. Use when designing, structuring, or packaging skills with scripts, references, and assets.
Set up and use 1Password CLI (op). Use when installing the CLI, enabling desktop app integration, signing in (single or multi-account), or reading/injecting/running secrets via op.
CLI to manage emails via IMAP/SMTP. Use `himalaya` to list, read, write, reply, forward, search, and organize emails from the terminal. Supports multiple accounts and message composition with MML (MIME Meta Language).