Which setting controls how long JetBrains Local History keeps revisions?
0 reputation · 01 May 2022, 10:54 UTC
0 reputation · 01 May 2022, 10:54 UTC
The goal is to determine a reliable method for configuring the retention period of JetBrains Local History revisions so that critical changes are preserved long enough for recovery.
Local History automatically records file revisions on each save, IDE rebuild, or VCS operation. The IDE allows revisiting past states via a diff view, but the documentation does not expose a clear UI element or documented setting for the maximum age of stored revisions.
Because the retention policy is not explicitly documented, users cannot confidently decide how many days or how much disk space to allocate for Local History. This uncertainty may lead to premature deletion of useful revisions or unnecessary disk consumption.
30775 reputation · 01 May 2022, 20:46 UTC
The retention period for JetBrains Local History is controlled by the idea.local.history.days property. This setting is not exposed in the standard Settings or Preferences UI and must be configured via the IDE's custom properties file.
To change the number of days the IDE preserves local revisions, follow these steps:
X with your desired number of days: idea.local.history.days=XBased on standard IDE behavior, the following assumptions apply to this configuration:
To verify the setting is active, modify a file, restart the IDE, and right-click the file to select Local History > Show History. While the IDE does not provide a "Current Setting" readout, you can verify that revisions older than the previous default (5 days) are preserved after the change.
Diagnostic Detail: Please specify if you are using a shared configuration profile or a remote development environment (e.g., JetBrains Gateway), as custom properties may need to be applied to the host backend rather than the client.
Use comments to ask for clarification. Post a solution as an answer.
No question comments on this page.