Install any skill in seconds. Free to start, no credit card required.
Get Started Free →Integrate Git workflows with Cursor IDE: AI commit messages, @Git context, diff review, and conflict resolution. Triggers on "cursor git", "git in cursor", "cursor version control", "cursor commit", "cursor branch", "@Git".
| Test case | Without → With | Effect | Δ tokens | Δ turns |
|---|---|---|---|---|
| case-02 | ✗→✓ | ▲ Improved | 69% | 0% |
| case-07 | ✗→✓ | ▲ Improved | 47% | 0% |
| case-08 | ✗→✓ | ▲ Improved | 47% | 0% |
| case-11 | ✗→✓ | ▲ Improved | 32% | 0% |
| case-14 | ✗→✓ | ▲ Improved | 64% | 0% |
Leverage Cursor's AI features within Git workflows: AI-generated commit messages, @Git context for code review, merge conflict resolution, and branch management.
Access with Cmd+Shift+G / Ctrl+Shift+G:
┌─ SOURCE CONTROL ────────────────────────────────┐
│ main ← current branch │
│ │
│ Changes (3) │
│ M src/api/users.ts │
│ A src/api/products.ts │
│ M prisma/schema.prisma │
│ │
│ Commit message: [✨ Generate with AI] │
│ [Commit] [Commit & Push] │
└─────────────────────────────────────────────────┘Click the sparkle/AI icon next to the commit message input. Cursor reads the staged diff and generates a message:
Example output:
feat: add product catalog CRUD API with Prisma model
- Add Product model to Prisma schema with name, price, category fields
- Create GET/POST/PUT/DELETE endpoints in src/api/products.ts
- Add Zod validation for product creation and update inputsTips for better commit messages:
yaml# .cursor/rules/git-conventions.mdc --- description: "Git commit conventions" globs: "" alwaysApply: true --- Use Conventional Commits format: - feat: new feature - fix: bug fix - refactor: code restructure without behavior change - docs: documentation only - test: adding or updating tests - chore: maintenance tasks Keep subject line under 72 characters. Body explains WHY, not WHAT (the diff shows what).
Use @Git in Chat or Composer to include git context:
@Git
Review my uncommitted changes. Check for:
- Any debugging code left in (console.log, debugger)
- Missing error handling
- Type safety issues
- Potential performance problems@Git includes the diff of all uncommitted changes (staged + unstaged).
@Git
Summarize all changes in this branch compared to main.
What features/fixes were implemented?
Are there any breaking changes?When on a feature branch, @Git shows the cumulative diff between your branch and main.
When a merge conflict occurs, use Chat for AI assistance:
@src/api/users.ts
I have a merge conflict in this file. The markers show:
<<<<<<< HEAD (my changes)
Added email validation with Zod
=======
Added phone number field to user schema
>>>>>>> feature/phone-support
Help me resolve this to keep both changes:
- Keep the Zod email validation from my branch
- Add the phone number field from the other branch
- Ensure the Zod schema includes phone validation toobash# 1. Start the merge git merge feature/other-branch # 2. List conflicted files git diff --name-only --diff-filter=U # 3. For each conflicted file, open in Cursor and use Chat: # @the-conflicted-file.ts # "Resolve the merge conflict. Keep both sets of changes where possible." # 4. After resolving, stage and commit git add . git commit -m "merge: resolve conflicts between feature branches"
@Git
I'm about to push this branch for code review. Act as a senior
reviewer and identify:
1. Code smells or anti-patterns
2. Missing test coverage
3. Security vulnerabilities
4. Performance concerns
5. Documentation gaps# In terminal, get the diff for a specific commit:
git show abc1234 > /tmp/commit-diff.txt
# In Chat:
@/tmp/commit-diff.txt
Review this commit for correctness and best practices.bash# Create and switch to feature branch git checkout -b feature/add-favorites # Open Cursor, use Chat to plan: # Cmd+L: # "@Codebase I need to add a favorites feature. # What existing patterns should I follow?" # Work with Composer/Tab... # When ready: git add . # Use AI commit message via Source Control panel git push -u origin feature/add-favorites
@Git
Before I push, check this branch for:
[ ] No .env or secret files staged
[ ] No TODO/FIXME comments that should be addressed
[ ] All new functions have type annotations
[ ] No commented-out code blocksCreate rules that leverage git context:
yaml# .cursor/rules/pr-standards.mdc --- description: "Standards for AI-assisted code review" globs: "" alwaysApply: false --- When reviewing code changes (@Git): - Flag any function without error handling - Flag any API endpoint without input validation - Flag any database query without parameterization - Suggest test cases for untested code paths - Check for proper HTTP status codes (not always 200)
GitLens works in Cursor and enhances git features:
Install from Open VSX: Cmd+Shift+X > search "GitLens"
Cursor has built-in Cursor Blame that attributes code to the AI agent that generated it, helping teams track which code was AI-generated vs human-written.
git commit -S for GPG/SSH signed commits (works normally in Cursor's terminal)Other measured skills in the registry, with their headline benchmark lift.