Restore Changes and Push a Project
Use Studio checkpoints and file history to recover work, then share changes through a connected repository.
Cloud Studio gives you checkpoints for agent turns, history for individual files, and repository tools for sharing code. Use a checkpoint when a prompt went wrong, or use file history when you only need to recover one file. Restoring your workspace doesn’t publish a change to your remote repository.
Undo an agent turn or restore a file
Studio captures the project files before an agent prompt. The checkpoint lets you return to the state before the prompt, even when the agent edited more than one file. Read the diff first so you can tell whether a single-file restore would be enough.
| What went wrong | What to use | What to check afterward |
|---|---|---|
| A prompt changed the wrong behavior across several files | Undo on the chat turn, when available | Open Preview and confirm the app is back to the state you wanted. |
| You only need an earlier version of one file | Choose a saved version in file history and restore it | Reopen the file and check that it still fits the other files in the project. |
A turn checkpoint restores a project state, so be careful if you also want to keep changes made after that turn. Review what you want to preserve before rolling back.
Publish reviewed files to a remote
For GitHub, open the project’s Configure drawer and find GitHub under Source. Enter the repository name and choose Push to mirror the current project files into a repository you own. Verify the result on GitHub before sharing it with a teammate.
Use the GitHub connector for branch sync, generated semantic commit messages, and opening pull requests with a Markdown summary of what changed. With the GitLab connector, push to a remote branch and use a merge request to share the change for review. These workflows are separate from restoring a checkpoint in Studio.
Keep an experiment separate from main
When working against a shared repository, put an experiment on a feature branch rather than pushing it to main. Check the destination branch on the remote before you publish. After reviewing the diff, include a summary of the behavior that changed and what you tested in the pull request or merge request.
If you decide not to share the experiment, keep it off the default branch. If a local change has already made the Studio workspace hard to use, restore the affected files or undo the responsible chat turn.