# How I Use AI + Git to Code 3x Faster (Real Dev Workflow with Cursor)
<!--
ref: @content/youtube/yifan-bth/how-i-use-ai-git-to-code-3x-faster-real-dev-workflow-with-cursor
tags: [AI coding, Git, version control, Cursor, commit workflow, prompt files, code review]
version: 2
updated_at: 2026-11-24T07:22:00.266Z
-->

**[Watch on YouTube](https://www.youtube.com/watch?v=opYhCWE7z-k)**

# How I Use AI + Git to Code 3x Faster (Real Dev Workflow with Cursor)

*Synthesized from Yifan on Beyond the Hype, 2024-11-15.*

Yifan presents this solo walkthrough of a development workflow that pairs AI coding assistance in Cursor with frequent, small Git commits.

## Core Thesis
Yifan argues that AI-generated changes are safer when they are small and tracked, so the developer should use Git as the checkpoint system and have the AI split each feature into small, logical chunks before implementing it. He adds that the commit messages, prompts and rules that make this consistent should live in the repository, so they evolve with the codebase and can be shared with teammates.

## Key Insights
- **Why version control matters more with AI.** Larger codebases make AI mistakes more likely, so the ability to track, compare and revert changes matters more. Breaking work into small chunks keeps the codebase in a working state and makes AI output easier to verify.
- **Break down before building.** For a feature such as a user profile page, he prompts the AI with the codebase context to split it into tasks such as database schema updates and page updates, then pastes those tasks into Cursor Composer one at a time.
- **Diff size.** In his example each change touched roughly two to five files, and most features took one or two prompts.
- **Commit messages from rules.** He generates the commit message from the working diff using a section of Cursor rules that defines prefixes and message format. Because the rules file is committed, it evolves with the code.
- **Prompt files in the repo.** Frequently used prompts are kept as Markdown files in the codebase, so they can be mentioned in Cursor chat or Composer.
- **Split long rules.** Very long rules files cause the AI to miss specific rules, so he breaks large rule sets into separate Markdown files that are pulled in when needed. He says the same approach works in GitHub Copilot or other chat tools that accept file mentions.
- **Cursor checkpoints.** Cursor saves a repository state each time a new chat starts and offers a revert, but he found that it sometimes reverted only some files and left the repo in a mixed state, so he does not rely on it.
- **Bigger commits, if needed.** Git's stage-changes feature lets you accumulate validated edits before committing, but he still recommends smaller commits because they are easier to track and revert.

## Actionable Takeaways
1. Ask the AI to split each feature into small tasks with the codebase context before implementing, and implement one task at a time.
2. Keep each AI change to a few files, and review the diff before accepting it.
3. Generate commit messages from the working diff using a committed rules section that defines your prefixes and format.
4. Store recurring prompts and rule sets as Markdown files in the repository, split into smaller files so they are reliably applied.
5. Use Git commits, not editor checkpoints, as the revert mechanism.

## Notable Quotes
> "Version Control is absolute must in this AI day and age" — Yifan

> "the smaller the chunk of work the more likely it is for AI to get the work correct" — Yifan

---

*Related: `@content/youtube/yifan-bth/getting-cursor-ai-to-review-its-own-code` · `@content/youtube/yifan-bth/unlocking-cursor-ai-top-8-hidden-features` · `@content/youtube/yifan-bth/openai-codex-revolutionary-workflow-or-200-mistake` · `@content/youtube/yifan-bth/5x-your-cursor-ai-coding-quality-with-these-pro-tips` · `@content/youtube/yifan-bth/the-ultimate-prototyping-workflow-cursor-ai-replit`*

---

*You're reading a protocol on [protocol.supply](https://protocol.supply) — hosted, searchable knowledge for AI agents. Think Agent Skills, as an API: bootstrap once (`curl -sL https://api.protocol.supply/bootstrap`), search (`/search?q=…`), fetch (`/@repo/slug`).*

*Any skill can become a protocol, and any protocol installs as a local skill — tell your agent "install this as a skill" or see [`@protocol/protocol-to-skill`](https://api.protocol.supply/@protocol/protocol-to-skill).*