This is not really a research-related question at all, but I can tell you what I do. I put everything (excluding large data sets) under distributed version control (Mercurial) and push to remote repositories frequently.
NB: You can easily automate the pushing if you desire; this has positive and negative aspects.
Of course, the two leading DVCS are Git and Mercurial, so either of these would work. Free hosting for Git is available at Github and Bitbucket, free hosting for Mercurial is available on Bitbucket. There are many other places you can put your repositories, of course, including remote servers your organization owns.
Note: large data sets require special handling, so I'm not sure about that, but they are often not original work, and can be retrieved from other places if necessary.
I strongly recommend doing this in conjunction with some sane method for saving "scratch" work (i.e. work in progress that is not yet suitable for a fully formed commit), so you don't have significant unsaved work lying on your hard disk. The important point here is to have a workflow by which you can sanely push commits at frequent intervals - I try to make commits every 1/2 hr or less. I use Mercurial queues. There is also a brand new thing called the Evolve Extension, but I have not tried
that yet. Git has similar software available. See for example, the Stack Overflow question git equivalent to hg mq? and What's the Git approach to publish a patch queue?. NB: If you do use a patch queue, you need of course to version it, otherwise you can't push it.
These methods can appear complex if you are not used to version control. However, I can attest this approach works well. My workstation died three times in the last 3 1/2 years, and each time I was able to switch to a different machine and carry on working without interruption, without access to the machine I had just been using.
See also Why use version control systems for writing a paper, particularly user244795's answer.