Tech Talk

Hidden Gems in Your IDE – Local History

Hidden Gems in Your IDE – Local History
  • Yannick Rödl

  • 3 min

  • September 1, 2024

Accidentally deleted half a day's work? IntelliJ's Local History and VS Code's Timeline can save you – even without a git commit. Here's how to use them.

Recover Lost Work Without Git – Your IDE's Built-in Time Machine

Being a developer means oscillating between joy and pain. After accidentally deleting several hours of work, I discovered a lifesaver: the IDE's local history feature.

IntelliJ IDEA: Local History

IntelliJ's Local History tracks all changes to files, directories, and the entire project – like a git history without commits. You can compare states, go back in time, and restore previous versions.

Find it via: right-click on a file or directory → Local History → Show History.

VS Code: Timeline

VS Code has a similar feature called Timeline, visible in the Explorer panel at the bottom. It's limited to individual files, but effective. To restore a deleted file: recreate a blank file with the same name, then copy the content from Timeline.

Key Points

  • Both features work independently of git                                                               
  • They provide a diff view of file changes                                                                      
  • IntelliJ's Local History covers directories and the whole project; VS Code's Timeline is file-level only

These tools complement git – they don't replace it. But they've saved more than a few developers from a very bad day.