Yesterday I completed the "Whodunit" exercise. Today I came back to start the "Resize" exercise, and I've discovered that (at least) two files are missing from the Whodunit directory - specifically, my file whodunit.c, and my file verdict.bmp - i.e. the required outputs for the exercise! As you can imagine, this is quite frustrating. It won't be that much work to re-create the whodunit.c code, but it's pretty worrying that the files have disappeared! I'm as sure as I can be that I saved them both - hitting cmd-S every 10 seconds is like a physical tick for me! NB, I'm working online at all times.

My question is - is there any way to go back through my history on the CS50IDE to find previous versions of file structures, and re-instate the files? Or even just to find out what happened?

Many thanks in advance for your help.


Try the following:

1) In the same directory where you had your whodunit.c file, create a new whodunit.c file. Leave it empty or just type a word and save it. 2) Go to File/Show Revision History. A bar will appear at the top with different dots and you can navigate back to get to the version you wanted.

If it doesn't work, or doesn't seem to work at first, try closing all tabs after saving whodunit.c and then open the new whodunit.c and try again. I just tried it with a file here, and it works although at first it seemed to get a bit confused. After closing all tabs and reopening only the one i wanted it seemed to work correctly.

It may or may not work also for the .bmp one, but i don't know. It doesn't matter too much, i guess because you can create it again, once you have whodunit back.

Have you been working with the IDE from different computers? Sometimes it can get really confused if you update your workspace somewhere while the workspace is still open in a different computer. Other than that, i have no idea what could have happened.

Hope this helps.

| improve this answer | |
  • Many thanks Irene. In the end it was pretty quick just to re-create the whodunit.c file, so I did that. I'll take a look at the Revision History for it though, and see what comes up. I have been working with the IDE from different computers, so it's possible I haven't been closing files and logging out properly between them - I'll make sure I'm more careful from now on! Thanks for the help. – Matt Friend Feb 9 '17 at 11:22

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .