Ask HN: Simple tool to record file history and revert at any time
I often have to poke around, change few lines and rely on unit tests to figure out issues.
sometimes, changing certain lines will cause issues, I have to revert back. But I don't remember what I have changed since last time.
we use both git and perforce for source code management. but the problem is, most of the changes I want to remember are my experiments, nothing serious to create a commit or changelist.
and if I do create a changelist in the perforce, my new change will overwrite my old change, I can't see its history and revert.
one solution my friend did was using perforce as the real source code management, and creating local git repository to document local change histories. but still, you need to manually commit changes.
I want to have a simple tool that provides undo/redo/diff between revisions on a text file I specified. it shouldn't be as heavy as git or perforce, shouldn't need a server.
I can't find anything like that, I'm planning writing it myself. but before I do anything, I'd like to ask here just in case.
For example, it can be a command line tool, with the following commands:
mytool -record aaa.txt
/home/hhh/aaa.txt is recorded at rev 0
mytool -showhistory aaa.txt
/home/hhh/aaa.txt has 4 revisions
rev 1 2016/04/34
rev 2 ...
...
mytool -undo aaa.txt
revert /home/hhh/aaa.txt to rev 3
mytool -redo aaa.txt
mytool -diff 4/3 aaa.txt
(will launch an external diff tool to show the difference)
mytool -forget aaa.txt
(get rid off all histories of aaa.txt)