Jetbrains IDEs have a local history feature that provides snapshots with diffs and allows partial rollbacks.
I only use it when experimenting with different approaches.
Mostly I only use the "Local Changes" tab in the Git panel that shows the diff compared to the last commit, or "Compare with branch" to see the overall changes relative to the base branch.
Local history saved my sorry butt yesterday when I thought I lost all my files due to a git-related accident.
But Local History still had all my changes and restored my files.
Unclear why this isn't baked into the OS nowadays. It's not like we don't have enough disk space ;)
I just saw something similar on Twitter[1]: a script that takes a ZFS snapshot after every command. This lets you jump back to the state of the whole filesystem after every single command that you ran, giving you a sort of global history.
I figure you could adapt that to something a bit more restrained that you could use on an ongoing basis to have a "Local History"-style feature for your whole OS :).
That looks amazing. I've used NetApp NFS filesystems that provided user level snapshots, where it automatically created snapshots of files. It wasn't after every command, but at regular intervals. You could access the files under `.snapshot` directory.
Searching now, it looks like this is part of NetApp ONTAP, and managed by a snapshot policy.
I have the feeling JetBrains do not understand how important this feature is for some developers. It does not have a shortcut and recently got buried in the File menu, almost as if they are ashamed of it. I am using it all the time and life would be much harder without it.
I came here to write this comment. I use this feature often and, like the sibling comment, it has saved my butt a ton! I love JetBrains IDE with Vim bindings
I only use it when experimenting with different approaches.
Mostly I only use the "Local Changes" tab in the Git panel that shows the diff compared to the last commit, or "Compare with branch" to see the overall changes relative to the base branch.