Git is a good source code version management system.

Additional, there are many free hosting.

  • Assembla (free plans)

Our free Git hosting provides you with a commercial-quality Git repository for you to host your code securely, and reliably in a good-looking package

All of our free Git repositories allow both private and public permissions so you can have full control over who is able to see and commit to your codebase.

  • BitBucket is mainly a mercurial hosting site

but there are plenty of blog posts (e.g. that show you how to use git with bitbucket. 5 user plans are free.

Unlimited Disk Space
Issue Tracking
Project Wiki
API Support
Flexible Permissions
Custom Domains
RSS Change History
Custom Downloads

  • ProjectLocker 3 Users, 300MBs, 3 Repos for free.
  • GitFarm is not quite free but at 12 bucks a year, it's pretty close.

Check out SO discussion. Not all free but lots of good information.