Checkpoints
Save and restore your code state safely
Checkpoints allow you to save the state of your codebase at any point during a conversation with Exponent. Think of them as snapshots of your work that you can safely return to later if needed, for example if you’re exploring multiple solutions to a problem or are disliking the direction of a conversation. Checkpoints are separate from Git commits, and are not visible in your Git history.
Creating a Checkpoint
To create a checkpoint during a conversation with Exponent, click the Checkpoint button next to the Submit button in the chat interface.
The checkpoint will be saved as an event in your chat history, capturing the exact state of your codebase at that moment.
When to Use Checkpoints
Checkpoints are useful in several scenarios, including:
- Before trying experimental changes: Create a checkpoint so you can easily revert if your changes don’t work out as expected.
- When exploring multiple solutions: Save progress at key points while exploring different approaches to a problem.
- Working without committing: When you’re not ready to create a Git commit but want to save your current state.
How Checkpoints Differ from Git Commits
You can always ask Exponent to create a Git commit for you, and it will do so. Here’s how to think about the difference between checkpoints and Git commits. Checkpoints are better for experimental work and exploration within Exponent, while Git commits remain important for permanent, shareable changes to your codebase.
Feature | Checkpoints | Git Commits |
---|---|---|
Visibility in Git history | Not visible | Visible in log |
Impact on repository | Non-destructive | Permanent part of history |
Scope | Single chat session | Repository-wide |
Include uncommitted changes | Yes | No |
Can be shared with others | No | Yes |