See this article for more about why using a proper version control system is a good idea that will make your day-to-day work easier and less stressful.

Watch these videos to get an impression of how straightforward it is to use a version control system: the small amount of time you spend getting started is very quickly recovered as time saved keeping track of your code, even for the smallest and simplest projects. And you can start using version control easily even for code you are already working on.

A collaborative environment helps you work on code and papers with colleagues

You can set up a private project on this site and then add to it any colleagues at your own or other institutions that you want to work with. This is helpful not just for software but for working on papers in text formats like LaTeX as well.

And even if it's just you working on the same software on more than one computer, it helps to have a shared server to manage your code on.

Project management facilities make it easier to keep track of all the things you have to do

With every project on this site you can switch on a number of optional modules. That includes a wiki, a shared editing environment for developing ideas with others and publishing them easily (the page you're reading now is part of a normal project wiki), issue trackers, a calendar and a space for attaching files to download such as software builds or accompanying data.

You should! If your institutional policies allow it, your supervisor is OK with it, and it suits the project you're working on, then using a site like these to host your code is a great idea.

But... these sites are usually aimed at either free open-source software, or proprietary companies that will pay for hosting. They don't cover the middle ground very well: "not public yet, though it might be public at some point, but in the meantime a few colleagues ought to be able to work on it with me" -- whereas we handle that sort of thing fine. Do take a closer look at these services, though, as you may find they have options that are suitable.