Skip to main content

File History

To make sure you never lose any of your work, Replit auto-saves your code as you write. If you ever lose an edit to your code that you'd like to recover, rewind back in time with File History.

How to open File History

  1. Open up a code or text file in the Workspace.
  2. Press the History button in the bottom right hand corner of the pane. history button image
  3. See the File History view of your file. file history view image

How to view previous versions of a file

Once you've opened up File History, you can view previous versions of a file by using the scroll bar.

scroll bar demo

How to compare a previous version to the latest version of a file

Press the Compare Latest toggle in the bottom left hand of the File History pane to see in-line comparisons of your file at that point in time and the latest version.

compare latest image

How to restore a previous version of a file

If you want to restore a file to a previous version, just press the Restore button, which will restore. Don't worry, you won't erase any history. When you restore to a previous version, it is added as a new version to the file's history.

restore history image

How to see a playback of your file history

You can use the playback feature of File History to watch your file change over time like a movie. This can be useful for creating videos of your programming sessions.

![replay history video][https://replit-docs-images.util.repl.co/images/programming-ide/file-history/replay.gif]

Was this doc useful?