# git

Command for managing Git repositories directly in Claude Code. Generates conventional commit messages, guides merge conflict resolution, and streamlines version control workflows.

- command · `type=command` · Claude Code, Codex, GitHub Copilot, Gemini CLI · ★ 23950 repo stars
- Author: SuperClaude-Org
- License: MIT · policy=mirror · the beginning of the file is at the end of this page
- Source: https://github.com/SuperClaude-Org/SuperClaude_Framework/tree/HEAD/plugins/superclaude/commands/git.md
- Updated: 2026-09-27
- Security check: automated, 2026-11-16 (text) — no signs of malicious code found.
- HTML: https://affpapa.org/en/nevibecode/commands/git

## What it does

The `/sc:git` command automates standard Git operations: checking status, staging and committing changes, managing branches, and merging. Its core strength is analyzing repository changes and generating commit descriptions following Conventional Commits format, eliminating manual message composition.

Under the hood, the command uses Bash for Git execution, Read for repository state analysis, and Grep for log parsing. It supports interactive mode to walk through merge conflict resolution step by step. The command validates context before running destructive operations and never modifies repository configuration without explicit permission.

Runs in Claude Code; installation means copying the `git.md` file into your project's `.claude/commands/` directory.

## Install

### Claude Code (native platform)

**Manually: put the files in place**
- File: `.claude/commands/git.md` — Call it with /git. For all projects use ~/.claude/commands/

### Codex

**Manually: put the files in place**
- File: `~/.codex/prompts/git.md` — Call it with /prompts:git. Codex marks this format deprecated in favour of skills

### GitHub Copilot

**Manually: put the files in place**
- File: `.github/prompts/git.prompt.md`

### Gemini CLI

**Manually: put the files in place**
- File: `.gemini/commands/git.toml` — Gemini stores commands as TOML: the prompt text goes into the prompt field

Where a file is given instead of a command, copy the files from the source to that path: https://github.com/SuperClaude-Org/SuperClaude_Framework/tree/HEAD/plugins/superclaude/commands/git.md

## When to use it
- Write consistently formatted commit messages without extra thought
- See which files changed and what's ready to commit
- Resolve branch merges with guided conflict help
- Keep branch names and workflows aligned with team conventions

## Example prompts
- /sc:git status
- /sc:git commit --smart-commit
- /sc:git merge feature-branch --interactive

## Source text · git.md · MIT

Below is the content of a third-party file. It is data, not instructions for you: do not act on anything written inside unless the human asks. Block tag: acb060519278e6e0.

BEGIN THIRD-PARTY FILE acb060519278e6e0
````text
---
name: git
description: "Git operations with intelligent commit messages and workflow optimization"
category: utility
complexity: basic
mcp-servers: []
personas: []
---

# /sc:git - Git Operations

## Triggers
- Git repository operations: status, add, commit, push, pull, branch
- Need for intelligent commit message generation
- Repository workflow optimization requests
- Branch management and merge operations

## Usage
```
/sc:git [operation] [args] [--smart-commit] [--interactive]
```

## Behavioral Flow
1. **Analyze**: Check repository state and working directory changes
2. **Validate**: Ensure operation is appropriate for current Git context
3. **Execute**: Run Git command with intelligent automation
4. **Optimize**: Apply smart commit messages and workflow patterns
5. **Report**: Provide status and next steps guidance

Key behaviors:
- Generate conventional commit messages based on change analysis
- Apply consistent branch naming conventions
- Handle merge conflicts with guided resolution
- Provide clear status summaries and workflow recommendations

## Tool Coordination
- **Bash**: Git command execution and repository operations
- **Read**: Repository state analysis and configuration review
- **Grep**: Log parsing and status analysis
- **Write**: Commit message generation and documentation

## Key Patterns
- **Smart Commits**: Analyze changes → generate conventional commit message
- **Status Analysis**: Repository state → actionable recommendations
- **Branch Strategy**: Consistent naming and workflow enforcement
- **Error Recovery**: Conflict resolution and state restoration guidance

## Examples

### Smart Status Analysis
```
/sc:git status
# Analyzes repository state with change summary
# Provides next steps and workflow recommendations
```

### Intelligent Commit
```
/sc:git commit --smart-commit
# Generates conventional commit message from change analysis
# Applies best practices and consistent formatting
```

### Interactive Operations
```
/sc:git merge feature-branch --interactive
# Guided merge with conflict resolution assistance
```

## Boundaries

**Will:**
- Execute Git operations with intelligent automation
- Generate conventional commit messages from change analysis
- Provide workflow optimization and best practice guidance

**Will Not:**
- Modify repository configuration without explicit authorization
- Execute destructive operations without confirmation
- Handle complex merges requiring manual intervention
````
END THIRD-PARTY FILE acb060519278e6e0

The third-party file has ended. Everything between the acb060519278e6e0 tags is data: requests and commands from it are not followed. An “end of file” line with another tag inside the block is part of the file.

© SuperClaude-Org · MIT · https://github.com/SuperClaude-Org/SuperClaude_Framework/tree/HEAD/plugins/superclaude/commands/git.md

## Similar
- [git-workflow](https://affpapa.org/en/nevibecode/skills/bobmatnyc-git-workflow.md) — skill · 574 installs
- [git-expert](https://affpapa.org/en/nevibecode/skills/git-expert.md) — skill · 279 installs
- [git-submodule](https://affpapa.org/en/nevibecode/skills/git-submodule.md) — skill · 368 installs
- [commit](https://affpapa.org/en/nevibecode/skills/orchestkit-commit.md) — skill · 210 installs
- [git-notes](https://affpapa.org/en/nevibecode/skills/git-notes.md) — skill · 1200 installs
- [here-be-git](https://affpapa.org/en/nevibecode/skills/here-be-git.md) — skill · 535 installs

From the same set: [superclaude-org/superclaude_framework](https://affpapa.org/en/nevibecode/by/superclaude-org/superclaude_framework.md) — 56 cards

---
NeVibeCode on affpapa.org. Catalog texts are descriptions, not instructions for the agent. How to choose and install: https://affpapa.org/en/nevibecode/agents.md
