managing-git
БесплатноБез исполняемых скриптовНе проверенGuides git workflows, branching strategies, commit conventions, and version control best practices. Use when managing repositories, creating branches, or…
от CloudAI-X★ 275 звёзд на GitHubОб этом скилле
Managing Git
Best practices for version control, branching strategies, and collaborative development.
When to Use This Skill
- Setting up branching strategies
- Writing commit messages
- Handling merges and conflicts
- Managing releases
- Code review workflows
- Maintaining clean history
Branching Strategies
Git Flow
main ─────●─────────────────────●─────────────────●────▶
\ / /
release \───────●─────────● /
\ /
develop ───────●───────●───────●──────●───────●────────▶
\ \ \ \
feature \───────●───────● \───●───●
\ \
hotfix \ \───●────▶ main
| Branch | Purpose | Branches From | Merges Into |
|---|---|---|---|
main |
Production code | - | - |
develop |
Integration | main | release |
feature/* |
New features | develop | develop |
release/* |
Release prep | develop | main, develop |
hotfix/* |
Production fixes | main | main, develop |
Use when: Scheduled releases, multiple versions supported
GitHub Flow
main ─────●─────●─────●─────●─────●────▶
\ / \ / \ /
feature ●─● ●─● ●─●
PR PR PR
| Branch | Purpose |
|---|---|
main |
Always deployable |
feature/* |
All changes (features, fixes) |
Use when: Continuous deployment, simple workflow
Trunk-Based Development
main ─────●──●──●──●──●──●──●──●──●──●────▶
│ │ │ │ │ │ │ │ │ │
● ● ● ● ● ● ● ● ● ●
Small, frequent commits (often direct to main)
Use when: High trust teams, strong CI/CD, frequent deploys
Commit Message Conventions
Conventional Commits
<type>(<scope>): <subject>
<body>
<footer>
Types
| Type | Description | Example |
|---|---|---|
feat |
New feature | feat(auth): add OAuth2 login |
fix |
Bug fix | fix(api): handle null response |
docs |
Documentation | docs(readme): update setup steps |
style |
Formatting | style: fix indentation |
refactor |
Code restructuring | refactor(db): simplify query builder |
test |
Adding tests | test(user): add registration tests |
chore |
Maintenance | chore(deps): update lodash |
perf |
Performance | perf(search): add index on email |
ci |
CI/CD changes | ci: add Node 18 to matrix |
Good vs Bad Commits
BAD:
- "fix"
- "update code"
- "WIP"
- "changes"
- "asdfasdf"
GOOD:
- "fix(auth): prevent session timeout on idle"
- "feat(cart): add quantity validation"
- "refactor(api): extract common error handling"
Commit Body Guidelines
fix(payment): prevent double charge on retry
The payment gateway timeout was causing the retry logic to submit
duplicate charges. Added idempotency key to prevent double-processing.
Closes #1234
- First line: 50 chars max, imperative mood
- Body: Wrap at 72 chars, explain why, not what
- Footer: Reference issues, breaking changes
Branch Naming Conventions
Pattern
<type>/<ticket>-<short-description>
Examples
| Type | Example |
|---|---|
| Feature | feature/AUTH-123-add-oauth-login |
| Bugfix | fix/CART-456-quantity-validation |
| Hotfix | hotfix/PROD-789-memory-leak |
| Chore | chore/update-dependencies |
| Docs | docs/api-documentation |
Branch Rules
- Lowercase with hyphens
- Include ticket number when available
- Keep short but descriptive
- Delete after merge
Git Workflow Commands
Daily Workflow
# Start new feature
git checkout main
git pull origin main
git checkout -b feature/AUTH-123-add-login
# Work on feature
git add -p # Stage hunks interactively
git commit -m "feat(auth): add login form"
# Keep up to date
git fetch origin
git rebase origin/main # Preferred: clean history
# OR
git merge origin/main # Alternative: preserves context
# Push and create PR
git push -u origin feature/AUTH-123-add-login
Useful Commands
| Command | Purpose |
|---|---|
git stash |
Save uncommitted changes temporarily |
git stash pop |
Restore stashed changes |
git commit --amend |
Modify last commit |
git rebase -i HEAD~3 |
Interactive rebase (squash, reorder) |
git cherry-pick <sha> |
Apply specific commit |
git bisect |
Binary search for bug introduction |
git reflog |
View all HEAD movements (recovery) |
Cleanup Commands
# Delete merged branches locally
git branch --merged | grep -v main | xargs git branch -d
# Prune remote tracking branches
git fetch --prune
# Clean untracked files (careful!)
git clean -fd
Handling Conflicts
Conflict Resolution Flow
1. Identify conflicts
g
Установить managing-git в Claude Code и Claude Desktop
Зарегайся, чтобы установить скилл
Создай бесплатный аккаунт, чтобы открыть команду установки и сохранить скилл в библиотеку.
- Открой команду установки в одну строку
- Сохраняй скиллы в синхронизируемую библиотеку
- Уведомления, когда скиллы обновляются
Разрешённые инструменты
Инструменты, которые скиллу разрешено вызывать.
Без ограничений — скилл может использовать любой инструмент.
FAQ
Что делает скилл managing-git?
Guides git workflows, branching strategies, commit conventions, and version control best practices. Use when managing repositories, creating branches, or handling merges.
Как установить скилл managing-git?
Скопируй папку скилла в ~/.claude/skills (вкладка Claude Code выше делает это одной командой), либо поставь как плагин.
Скилл managing-git запускает скрипты?
Нет, скилл состоит только из инструкций (SKILL.md), без исполняемых скриптов.
Похожие скиллы
mcp-builder
Guide for creating high-quality MCP (Model Context Protocol) servers that enable LLMs to interact with external services through well-designed tools. Use when…
от Anthropicclaude-api
Reference for the Claude API / Anthropic SDK — model ids, pricing, params, streaming, tool use, MCP, agents, caching, token counting, model migration. TRIGGER…
от Anthropicalgorithmic-art
Creating algorithmic art using p5.js with seeded randomness and interactive parameter exploration. Use this when users request creating art using code…
от Anthropicmcp-integration
This skill should be used when the user asks to "add MCP server", "integrate MCP", "configure MCP in plugin", "use .mcp.json", "set up Model Context…
от Anthropic