# Source: https://docs.replit.com/replit-workspace/workspace-features/version-control.md

> ## Documentation Index
> Fetch the complete documentation index at: https://docs.replit.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Version control

> Track changes, collaborate with others, and manage your code's evolution using Replit's integrated version control tools.

Version control on Replit enables you to track, manage, and collaborate on your codebase with confidence. With built-in Git integration and GitHub connectivity, you can:

* Track code changes and maintain a history of your development work
* Collaborate with team members without code conflicts or lost work
* Import, modify, and push code between Replit and GitHub
* Work with branches to experiment with new features safely

## What is version control?

Version control is a system that records changes to files over time, allowing you to recall specific versions later. On Replit, version control is powered by Git—the industry-standard tool for tracking code changes—with a user-friendly visual interface that eliminates the need for command-line knowledge.

<Frame>
  <img src="https://mintcdn.com/replit/9NKf1XREDj9JhKJb/images/workspace/checkpoints-vc.jpg?fit=max&auto=format&n=9NKf1XREDj9JhKJb&q=85&s=d83568932b7da97cb0eb4e072bafdb12" alt="Agent checkpoints in the Git pane" data-og-width="1920" width="1920" data-og-height="1080" height="1080" data-path="images/workspace/checkpoints-vc.jpg" data-optimize="true" data-opv="3" srcset="https://mintcdn.com/replit/9NKf1XREDj9JhKJb/images/workspace/checkpoints-vc.jpg?w=280&fit=max&auto=format&n=9NKf1XREDj9JhKJb&q=85&s=048ae59e97d09331e3bbb9f0c7710be1 280w, https://mintcdn.com/replit/9NKf1XREDj9JhKJb/images/workspace/checkpoints-vc.jpg?w=560&fit=max&auto=format&n=9NKf1XREDj9JhKJb&q=85&s=7b4034434f64223d550a1d6fa1fdcde8 560w, https://mintcdn.com/replit/9NKf1XREDj9JhKJb/images/workspace/checkpoints-vc.jpg?w=840&fit=max&auto=format&n=9NKf1XREDj9JhKJb&q=85&s=d085fba6836e1abda54967cf4f1d9b4e 840w, https://mintcdn.com/replit/9NKf1XREDj9JhKJb/images/workspace/checkpoints-vc.jpg?w=1100&fit=max&auto=format&n=9NKf1XREDj9JhKJb&q=85&s=ee6424012adab0d7e776e1a4485477ea 1100w, https://mintcdn.com/replit/9NKf1XREDj9JhKJb/images/workspace/checkpoints-vc.jpg?w=1650&fit=max&auto=format&n=9NKf1XREDj9JhKJb&q=85&s=4373cc8b04e152a2f357d244867e828b 1650w, https://mintcdn.com/replit/9NKf1XREDj9JhKJb/images/workspace/checkpoints-vc.jpg?w=2500&fit=max&auto=format&n=9NKf1XREDj9JhKJb&q=85&s=42922cf00079669f5f766914ac4326ab 2500w" />
</Frame>

### How version control works on Replit

All four version control options interact with the same underlying Git repository:

1. **Agent Checkpoints** create commits automatically at important milestones when building with [Replit Agent](/replitai/agent). [Learn more about checkpoints and rollbacks](/replitai/checkpoints-and-rollbacks).
2. **Git Pane** provides visual access to the complete Git repository
3. **Git CLI** offers command-line access to all Git functionality
4. **File History** tracks granular changes within individual files

Choose the interface that best matches your needs, with the confidence that everything is backed by Git's robust version control system.

| Feature              | Agent Checkpoints             | Git Commits                   | File History             |
| -------------------- | ----------------------------- | ----------------------------- | ------------------------ |
| **Creation**         | Automatic at logical points   | Manual or scheduled           | Automatic for user edits |
| **Granularity**      | Feature-level changes         | Any change size               | Character-level changes  |
| **Description**      | AI-generated summaries        | User-written messages         | Automatic timestamps     |
| **Rollback**         | One-click restore             | Requires Git knowledge        | One-click restore        |
| **Git capabilities** | Full Git capabilities         | Full Git capabilities         | No Git capabilities      |
| **GitHub sync**      | Full GitHub sync capabilities | Full GitHub sync capabilities | No GitHub sync           |

## Getting started

Access version control in your Replit App by adding the Git tool to your workspace:

1. Navigate to the Tools section in your Replit App
2. Select the **+** sign to add new tools
3. Select **Git** from the list of available tools

To import existing projects from GitHub, see [Import from GitHub](/getting-started/quickstarts/import-from-github).

## Version control options

Replit's version control is powered by Git at its core. You have multiple ways to interact with and benefit from version control:

<Frame>
  <img src="https://mintcdn.com/replit/9NKf1XREDj9JhKJb/images/workspace/git-pane.jpg?fit=max&auto=format&n=9NKf1XREDj9JhKJb&q=85&s=edfa4f3de48eaca1b3fc39b26ef42efe" alt="Git pane showing the initialize repository button" data-og-width="1920" width="1920" data-og-height="1080" height="1080" data-path="images/workspace/git-pane.jpg" data-optimize="true" data-opv="3" srcset="https://mintcdn.com/replit/9NKf1XREDj9JhKJb/images/workspace/git-pane.jpg?w=280&fit=max&auto=format&n=9NKf1XREDj9JhKJb&q=85&s=157281bc1656891e85ba54e849548981 280w, https://mintcdn.com/replit/9NKf1XREDj9JhKJb/images/workspace/git-pane.jpg?w=560&fit=max&auto=format&n=9NKf1XREDj9JhKJb&q=85&s=e84c1fc54b0bd42d4bee7b0812a4954a 560w, https://mintcdn.com/replit/9NKf1XREDj9JhKJb/images/workspace/git-pane.jpg?w=840&fit=max&auto=format&n=9NKf1XREDj9JhKJb&q=85&s=e4751da20d9ab59f656a0b159437e933 840w, https://mintcdn.com/replit/9NKf1XREDj9JhKJb/images/workspace/git-pane.jpg?w=1100&fit=max&auto=format&n=9NKf1XREDj9JhKJb&q=85&s=72bb048e7b77c683866c05d9bf2c94c3 1100w, https://mintcdn.com/replit/9NKf1XREDj9JhKJb/images/workspace/git-pane.jpg?w=1650&fit=max&auto=format&n=9NKf1XREDj9JhKJb&q=85&s=24f4ed4e693f02044c34dfce21c823e4 1650w, https://mintcdn.com/replit/9NKf1XREDj9JhKJb/images/workspace/git-pane.jpg?w=2500&fit=max&auto=format&n=9NKf1XREDj9JhKJb&q=85&s=ec96ed66fd2906cad80810e50f10266d 2500w" />
</Frame>

### Automatic version control

<Accordion title="Agent Checkpoints">
  Automatic snapshots created during AI-assisted development with [Replit Agent](/replitai/agent).

  **Best for**: Development with Replit Agent

  **Key capabilities**:

  * Automatic creation at logical milestones
  * One-click rollback
  * Feature-level snapshots
  * Progress tracking
  * No setup required
  * Visual timeline of development progress

  Agent checkpoints are stored in Git and can be accessed through the Git Pane or Git CLI. You can also visualize all your checkpoints using the History feature, which provides:

  * Chronological checkpoint visualization
  * Detailed checkpoint descriptions
  * Direct access to checkpoint states
  * One-click rollback to any checkpoint
</Accordion>

<Accordion title="File History">
  Per-file version tracking with automatic saving for user edits.

  **Best for**: Quick recovery of recent file changes

  **Key capabilities**:

  * Single file focus
  * Character-level changes
  * Visual comparison
  * 30-day history
  * Playback feature

  While File History provides its own interface, the underlying changes are part of Git's history. Learn more about [File History](/replit-workspace/workspace-features/file-history).
</Accordion>

### Git-based interfaces

<Accordion title="Git Pane">
  A visual interface for Git operations that makes version control accessible without command-line knowledge.

  **Best for**: Most projects requiring GitHub integration and visual workflow

  **Key capabilities**:

  * Repository-wide tracking
  * Branch management
  * Visual diff viewing
  * One-click GitHub sync
  * Team collaboration

  For detailed instructions on using the Git pane, see [Using the Git pane](/replit-workspace/workspace-features/git-interface).
</Accordion>

<Accordion title="Git CLI">
  Full command-line access to Git through the [Shell](/replit-workspace/workspace-features/shell) for advanced operations.

  **Best for**: Power users who need complete Git functionality

  **Key capabilities**:

  * Full Git command set
  * Advanced branching strategies
  * Custom workflows
  * Script automation
  * Complete repository control

  For common Git commands and usage, see [Using the Git pane](/replit-workspace/workspace-features/git-interface#using-git-commands-in-shell).
</Accordion>

## Key features

* **Visual Git interface**: Manage repositories, commits, and branches without typing Git commands
* **GitHub integration**: Connect to GitHub repositories for backup and collaboration
* **Import from GitHub**: Turn any [GitHub repository into a Replit App](/getting-started/quickstarts/import-from-github) with a few clicks
* **Branch management**: Create, switch between, and merge branches directly in your workspace
* **Conflict resolution**: Identify and resolve merge conflicts with visual assistance

## Use cases

**Tracking your personal projects**

Track changes to your code as you develop, allowing you to revert to previous versions if needed. The [Git pane](/replit-workspace/workspace-features/git-interface) shows your changes visually, making it easy to commit meaningful updates.

**Collaborating with a team**

Work with multiple developers on the same codebase without overwriting each other's changes. Create branches for new features, then merge them back when ready. Learn more about [collaboration tools](/replit-app/collaborate).

## Agent checkpoints

When building applications with [Replit Agent](/replitai/agent), you benefit from an additional layer of version control through checkpoints. Checkpoints automatically capture the comprehensive state of your project—including workspace contents, AI conversation context, and connected databases—at key moments during AI-assisted development.

<Frame>
  <img src="https://mintcdn.com/replit/9NKf1XREDj9JhKJb/images/workspace/checkpoints.jpg?fit=max&auto=format&n=9NKf1XREDj9JhKJb&q=85&s=4962536194cdfa5b0c08503ad0d9b3af" alt="Agent checkpoints in the Git pane" data-og-width="1920" width="1920" data-og-height="1080" height="1080" data-path="images/workspace/checkpoints.jpg" data-optimize="true" data-opv="3" srcset="https://mintcdn.com/replit/9NKf1XREDj9JhKJb/images/workspace/checkpoints.jpg?w=280&fit=max&auto=format&n=9NKf1XREDj9JhKJb&q=85&s=074926ddfcbaad0c98f23c9a2941387a 280w, https://mintcdn.com/replit/9NKf1XREDj9JhKJb/images/workspace/checkpoints.jpg?w=560&fit=max&auto=format&n=9NKf1XREDj9JhKJb&q=85&s=b5d303e0bfb754766920462e34c8174d 560w, https://mintcdn.com/replit/9NKf1XREDj9JhKJb/images/workspace/checkpoints.jpg?w=840&fit=max&auto=format&n=9NKf1XREDj9JhKJb&q=85&s=4227c95d3b831bfb29adcdd9c65f2fa7 840w, https://mintcdn.com/replit/9NKf1XREDj9JhKJb/images/workspace/checkpoints.jpg?w=1100&fit=max&auto=format&n=9NKf1XREDj9JhKJb&q=85&s=cae59ccbd5a64d1ce7f55f24289e45a5 1100w, https://mintcdn.com/replit/9NKf1XREDj9JhKJb/images/workspace/checkpoints.jpg?w=1650&fit=max&auto=format&n=9NKf1XREDj9JhKJb&q=85&s=f915ae2d6bb956d6d22bb1fb28d0e9b3 1650w, https://mintcdn.com/replit/9NKf1XREDj9JhKJb/images/workspace/checkpoints.jpg?w=2500&fit=max&auto=format&n=9NKf1XREDj9JhKJb&q=85&s=8b88873451e2266fb41ed42a3712789d 2500w" />
</Frame>

### How checkpoints work

Agent checkpoints function as comprehensive snapshots of your entire Replit App state:

* **Automatic creation**: Agent creates checkpoints at logical points during development
* **Complete state capture**: Each checkpoint preserves workspace contents, AI memory, and database states
* **Implementation plans**: Before making changes, Agent presents a plan for your review
* **Complex task tracking**: Multiple checkpoints may be created for larger tasks

### Benefits for AI-assisted development

Agent checkpoints provide unique advantages when building with AI:

* **Safety net**: Experiment confidently knowing you can easily restore previous states across your entire development environment
* **Progress tracking**: See exactly how Agent built your application step by step
* **Logical milestones**: Checkpoints represent complete features rather than arbitrary save points
* **Instant rollback**: Return to any previous state with a single click, including database and AI context restoration

<Info>
  For detailed information about what checkpoints capture and comprehensive rollback capabilities, see [Checkpoints and Rollbacks](/replitai/checkpoints-and-rollbacks).
</Info>

<Tip>
  While Agent checkpoints are powerful for development with AI, consider using Git commits for long-term version tracking and collaboration, especially when working with external repositories.
</Tip>

## Next steps

To learn more about version control on Replit, see the following resources:

* [Using the Git pane](/replit-workspace/workspace-features/git-interface): Master Replit's visual Git interface
* [Import from GitHub](/getting-started/quickstarts/import-from-github): Turn GitHub repositories into Replit Apps
* [Collaboration tools](/replit-app/collaborate): Work with others on shared projects
* [File History](/replit-workspace/workspace-features/file-history): Explore file-level version history
* [Replit Agent](/replitai/agent): Learn more about AI-assisted development