I just discovered the web-based hosting service Bitbucket/SourceTree (https://bitbucket.org) as an interface to various version control systems. The website and the local client SourceTree together implement a very convenient user interface to the MECURIAL and GIT (by Linus Torvalds) version control system. There are free (limited) accounts and the option to keep private and public code repositories.
If you are a lonesome coder, saving multiple files with consecutive number (_V1.txt,V2.txt,..) might do the job for you, but as soon as you do collaborative coding or regularly review the code (changes) by others, these tools will be of great help. Version control systems are excellent tools for text-based documents (txt, xml, PDF), but might choke on large files, so be careful what to include into your VCS tree.
BTW, the emacs editor has modes to support those version control systems (http://www.emacswiki.org/emacs/Git).