For everything else there is something called version control. This means that changes to a file are kept in a database, so that you can revert back to an old version or compare changes made to the file. This helps in coding if you all of a sudden have a bug that wasn't present before.

For advanced users there are a lot of options. You can run your own subversion or git server, and run a client like TortoiseSVN to interface with it. When you are ready to edit the file, you "check out" with it, and when you are done you check it back in. Although this works, it is a lot of work to do outside of your edit.

The free software FileHamster takes care of all of this work for you.

FH1

Once you install FileHamster, it runs in the background and can monitor a particular file or folder for changes and immediately save them into its repository.

This works for all file types, so whatever you are working on is covered. Also, if you only want to run it for certain file types, you can specify that as well. There are many options to set if you want to get tricky with things. For example if you wanted to keep X number of copies or only check for changes every X number of minutes.

FH2

Each file has a menu where you can really get specific on each revision of a file. If you protect a revision, it will be saved until you unprotect it or tell it to specifically remove that revision. It's a nice feature for coders, since you can "freeze" a version of a file for reference in the future.

Comments also work the same way. If a revision is an important or a major milestone, it is nice to add a comment to it for posterity.

The one downside I noticed when using FileHamster is that it can be very slow if you are managing a large amount of data. Also, it keeps a copy of all files in its library, and each revision of a file is that much more disk space it will take up. So for smaller text files this is fine, but if you are going to be needing version control for larger files you may need to look into another solution - for example one that stores a diffs - just the changes to a file so the entire file doesnt need to be copied.

Finally the free version does support mapped drives but it does not manage UNC paths. There are also some other features only available in the pay version ($20) such as the ability to launch editors right from the FileHamster GUI, but the free version is very usable and a good tool to add to your arsenal.