How It Works
Cline maintains a shadow Git repository separate from your project’s actual Git history. After each tool use (file edits, commands, etc.), Cline commits the current state of your files to this shadow repo. Your main Git repository stays untouched. This means:- Your Git history remains clean and under your control
- Checkpoints capture everything, including files not tracked by Git
- You can restore to any point in a task without affecting commits you’ve made
- Checkpoints persist across editor sessions
Enable or Disable Checkpoints
Checkpoints are enabled by default. To toggle them:- Open Cline settings (gear icon in the Cline sidebar)
- Scroll to the “Feature Settings” section
- Toggle “Enable Checkpoints”
For very large repositories, checkpoints may use significant storage and slow down Cline as it commits file snapshots after each tool use. Consider disabling them if you notice performance issues.
Viewing and Comparing Changes
After each tool use, a checkpoint indicator appears in your conversation. Look for a bookmark icon labeled “Checkpoint” with a dotted line connecting to Compare and Restore buttons. Click Compare to open a diff view showing exactly what changed at that checkpoint. This opens in your editor’s diff viewer, letting you see additions, deletions, and modifications across all affected files. This is useful when Cline makes changes you want to understand before deciding whether to keep them. You can review the diff, then either continue or restore to undo.Restoring Checkpoints
Click Restore next to any step to open the restore menu. You have three options:
The right choice depends on what went wrong:
- If the conversation is productive but the code changes broke something, use Restore Files. Cline keeps all the context you’ve discussed and can try a different implementation.
- If Cline’s code changes are good but the conversation went off track, use Restore Task Only. You keep the files and can guide the conversation differently.
- If you want to start over from a clean slate, use Restore Files & Task. This resets both your files and the conversation to that checkpoint.
When to Use Checkpoints
Working with Auto-Approve
Checkpoints make auto-approve practical. Without checkpoints, auto-approve feels risky because Cline can make many changes before you notice a problem. With checkpoints, you can let Cline work autonomously and roll back if needed. A typical workflow:- Enable auto-approve for file edits and commands
- Let Cline work through your task quickly
- Review the final result
- If something is wrong, restore to the last good checkpoint
- Give Cline more specific guidance

