Features PhpStorm Tutorials Videos WebStorm

Using Local History for code changes tracking

Do you use version control system such as Git, CVS, Mercurial, Subversion or any other and enjoy all the things they are doing to keep track of your code? If you do we have Local History to expand VCS functionality for you locally, however, in case you don’t we have Local History feature to help you keep track of everything going on with your code!

Writing, refactoring, editing, testing – there are constant changes in the code. We bet you met occasions when you need information about code changes, but version control systems can’t help you because they track and compare differences only between committed versions – you just can’t commit so often to have a track of all your small changes. Some local changes between commits are unnoticed for VCS and here Local History feature comes tracking all the changes!

This functionality is available in IntelliJ Idea, PyCharm, WebStorm, PhpStorm, RubyMine, AppCode.


Local History works with all the textual files within project directories (for files >1mb only keeping fact of change). It applies to any structural artifacts: a project, a directory or package, a file, a class, class members, tags, or selected fragment of text. Local History does not have shared access and intended to help you personally.

Functionality is available and switched on by default. Moreover, Local History revisions are added automatically while you work on the project. Revisions are marked with labels based on predefined events, however you can add your own labels when there is something special you need to mention.

In order to view local history for file or folder select it in the Project tool window or open a file in the editor and get Local History tool window by pressing Alt + Backquote / Control +V and choose the desired command from the VCS Operations quick list or get it through menu VCS | Local History | Show History. You can get it through the context menu as well.

In the Local History tool window you can select change in the tree on the left and check what was changed. You can revert changers, copy some piece of code or create a patch (more info on creating and applying patches).

In order to find changes in specific line or block of code just select it and invoke Show Local History for Selection using one of the methods described above.

There are no changes in the code you can lose with Local History features – all the changes are tracked, labeled and kept for your convenience and high performance!

Develop with pleasure!
– JetBrains Web IDE Team

Comments below can no longer be edited.

7 Responses to Using Local History for code changes tracking

  1. Avatar

    Endijs Lisovskis says:

    October 24, 2012

    In which situations Local History gets lost? For example – what happens if new standalone version of phpStorm gets installed? I presume that it will not have this History. Any way to migrate/import? I know that once i lost it, just don’t remember now what I did. I think that new version. Or maybe invalidate caches?

    • Avatar

      Mikhail Vink says:

      October 24, 2012

      Local history is cleared when you install new version or invalidate caches. Actually you can’t migrate or import it from version to version. Local history is not intended to replace normal VCS, but intended to expand it – just commit all the changes before upgrading or invalidating caches.

    • Avatar

      Madis says:

      October 24, 2012

      When IntelliJ project configuration files get corrupt after your pc wakes up from suspended state, but can’t really blame IntelliJ for not keeping another copy.

  2. Avatar

    Joshua says:

    October 24, 2012

    Local History saved me in a huge, huge way. Once I accidentally git –reset hard an entire directory instead of just certain files. By jumping into the Local History of those files, I was able to get to my important changes that would otherwise have been lost forever….

  3. Avatar

    Mike Schinkel says:

    October 24, 2012

    This feature totally saved my ass a few days ago when I accidentally ran a Git command that reverted a day’s worth of development:
    PhpStorm Local History to the rescue!

  4. Avatar

    interfaSys says:

    October 24, 2012

    This is a great feature, but even if it’s not intended to replace VCS, I think it would be great if it could survive upgrades 😉

  5. Avatar

    Testing Tester says:

    October 25, 2012

    Improve local history by this:

Discover more