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".
78
75%
Does it follow best practices?
Impact
Pending
No eval scenarios have been run
Passed
No known issues
Optimize this skill with Tessl
npx tessl skill review --optimize ./plugins/saas-packs/cursor-pack/skills/cursor-git-integration/SKILL.mdLeverage 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:
# .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 too# 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.# 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:
# .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)3e83543
If you maintain this skill, you can claim it as your own. Once claimed, you can manage eval scenarios, bundle related skills, attach documentation or rules, and ensure cross-agent compatibility.