> ## 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

> Learn how to track changes and manage your code's history with Replit's 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" width="1920" height="1080" data-path="images/workspace/checkpoints-vc.jpg" />
</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](/core-concepts/agent). [Learn more about checkpoints and rollbacks](/core-concepts/agent/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               |
| **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 the Project Editor:

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" width="1920" height="1080" data-path="images/workspace/git-pane.jpg" />
</Frame>

### Automatic version control

<Accordion title="Agent Checkpoints">
  Automatic snapshots created during AI-assisted development with [Replit Agent](/core-concepts/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 non-Agent changes done directly on the editor.

  **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](/core-concepts/project-editor/version-control/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](/core-concepts/project-editor/version-control/git-interface).
</Accordion>

<Accordion title="Git CLI">
  Full command-line access to Git through the [Shell](/core-concepts/project-editor/editor-and-tools/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](/core-concepts/project-editor/version-control/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 the Project Editor
* **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](/core-concepts/project-editor/version-control/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 [inviting teammates](/replitai/invite-teammates).

## Agent checkpoints

When building applications with [Replit Agent](/core-concepts/agent), you benefit from an additional layer of version control through checkpoints. Checkpoints automatically capture the comprehensive state of your project—including project 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" width="1920" height="1080" data-path="images/workspace/checkpoints.jpg" />
</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 project 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](/core-concepts/agent/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](/core-concepts/project-editor/version-control/git-interface): Master Replit's visual Git interface
* [Import from GitHub](/getting-started/quickstarts/import-from-github): Turn GitHub repositories into Replit Apps
* [Invite teammates](/replitai/invite-teammates): Work with others on shared projects
* [File History](/core-concepts/project-editor/version-control/file-history): Explore file-level version history
* [Replit Agent](/core-concepts/agent): Learn more about AI-assisted development
