I’ve been saving some automatically-generated performance data for my code in perf.txt. Every time I improve my code, I run a script that overwrites perf.txt with the new performance data. I’ll then commit perf.txt.
In retrospect, overwriting perf.txt was a bone-headed mistake, and now, I’d like to make some analysis/plot a graph of my improvement, but can’t. Of course, the old perf.txt files are still out there in my commit history. Is there any easy way to get them? Ideally I’d like to have perf~1.txt, perf~2.txt, etc. in a new directory, along with time stamps.
Alternatively, if I could simply “replay” the commit history (e.g. git next perf.txt) like git-bisect does – but linearly – that would work too.
Ok, I managed to create a shell script for this. Let me know if it works fine.
Update:
Will output:
Which will remain in correct order when sorted.
Original:
Replace
package.jsonwith the file you want in all the 3 places.This will create files like this: