GoLand Local History loses revision chain after external file rename
0 reputation · 23 Dec 2024, 17:40 UTC
I rely on GoLand's Local History (right-click → Local History → Show History) as a safety net for recovering edits before they are committed to VCS. One behavior I cannot find clearly documented is what happens to a file's revision timeline when the file is renamed or moved outside the IDE, for example with a shell mv command.
My understanding is that Local History keys revisions to the file path, so an external rename may be recorded as a deletion of the old path plus the creation of a new file. That would break the continuous history chain and make pre-rename revisions hard to locate, since Show History on the new path would appear empty or start fresh.
My goal is to preserve the ability to recover and verify older revisions of a file across a rename that happened outside GoLand, without guessing where the old entries went. Assume a recent GoLand version (2024.x) with default retention settings.
Does Local History actually treat an external rename as delete-plus-create, and if so, is there a supported way to view or restore the pre-rename revisions? Does renaming through GoLand's refactor action preserve the chain instead? Is this behavior version-dependent enough that I should verify it on my exact build?