Like most habits, you have to just start doing it to form it. So choose a version control system that you're wanting to learn and start using it.
In your case, I'd suggest using
git. You'll want it if you're going to use GitHub, but better yet, because of its distributed nature it is extremely easy to start saving data in version control. Just do a
git init on your project folder and start enjoying benefits such as:
- Ability to see what you've changed over time.
- Undo or stash uncommitted changes.
- Removing the fear of changing things.
- Ability to quickly branch and tag.
Then when you're ready to use GitHub, you can just push your existing repository up into GitHub.
There is kind of a high learning curve for git, so you might choose something else like Subversion (
svn). But unfortunately, with centralized (vs. distributed) systems it is harder to set up the repository initially. Git makes it stupidly easy -- I don't go without version control on even the smallest code snippets anymore.
Just playing around with version control on any project will help you get familiar with your system of choice. With Git there are some different workflows (e.g.
git flow) that are used, but to start off you can just experiment.
- Do experiment and try things out. Don't know how to branch and merge? Just try it on a sample project.
- Do commit frequently.
- Do learn how to view and use the history so you can get back old data.
- Do integrate often (once you start working with others).
- Don't be afraid. As long as it's your own repository, even if you mess things up you won't affect anyone else. And things won't get any worse (data loss wise) than if you didn't use version control.
- Share code that breaks the build (i.e. won't compile, fails unit tests, etc.) When you're on your own it's not so important, but don't get into a bad habit.