Programmers always need to create new files to update old one. And later they might need them back, to run the program. My suggestion is, always create a "dump" folder in every folder. So that you can keep all of your old files. So whenever you need them you can collect from there. Some editing tool keeps record of old file. But it won't keep all old files. And After completion of the work when you submit, can delete them.