After updating mavericks to the latest version, I restarted my macbook air, booted up xcode, and xcode prompted a message something like: "An outside editor changed text context, would you like to revert to old, or keep it?"
So without thinking I clicked revert to old, and now I have lost about 10 hours of code and can't find a solution to restore it.
Unfortunately I didn't store a snapshot recent enough, and I can't seem to find any other way through the forums and other search.
While I'm at it, does anyone know of a way so that it creates a snapshot automatically before exiting xcode?
Any help is much appreciated!
From your description of the problem, nothing can be done unless you use version control or backup.
Using version control is a very good investment of your time, also making regular backups is a very good idea.