Have you ever:
In these cases, and no doubt others, a version control system should make your life easier.
To misquote a friend: A civilised tool for a civilised age.
Even if you work alone you can benefit from source control. Among others, for these reasons:
You don't lose anything. I never again commented out code. I simply delete it. It doesn't clutter my screen, and it isn't lost. I can recover it by checking out an old commit.
You can experiment at will. If it doesn't solve the problem, revert it.
You can look at previous versions of the code to find out when and where bugs were introduced. git bisect
is great in that regard.
More "advanced" features like branching and merging let you have multiple parallel lines of development. You can work in two simultaneous features without interference and switch back and forth without much hassle.
You can see "what changed". This may sound basic, but that's something I find myself checking a lot. I very often begin my one-man workflow with: what did I do yesterday?
Just go ahead and try it. Start slowly with basic features and learn others as you go. You will soon find that you won't ever want to go back to "the dark ages" of no VCS.
If you want a local VCS you can setup your own subversion server (what I did in the past), but today I would recommend using git
. Much simpler. Simply cd
to your code directory and run:
git init
Welcome to the club.
Version control is a rare tool that I would say is absolutely required, even if you are only using it as a solo developer. Some people say that it's a tool that you live and die by, I agree with that assertion.
You probably use version control right now, even if you don't know it. Do you have any folders that say "XXX Php Code (December)" or "XXX.php.bak.2"? These are forms of version control already. A good version control system will take care of this for you automatically. You will be able to roll back to any point in time (that you have data checked in) and be able to see an exact copy of that data.
Furthermore, if you adopt a system like subversion, and use a remote repository (such as one on a server you own), you will have a place to keep all of your code. Need a copy of your code somewhere else? No problem, just check it out. Hard drive crash at home? Not an issue (at least with your source code).
Even if you don't use version control now, you will likely use it at one point in time later in your career and you could benefit from becoming more comfortable with the principles now.
Even working alone, has this ever happened? You run your app, and something does not work and you say "that worked yesterday, and I swear I did not touch that class/method." If you are checking in code regularly, a quick version diff would show exactly what had changed in the last day.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With