Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Using Version Control for Home Development?

Tags:

svn

People also ask

Why do developers use version control system?

Version control software keeps track of every modification to the code in a special kind of database. If a mistake is made, developers can turn back the clock and compare earlier versions of the code to help fix the mistake while minimizing disruption to all team members.


Completely.

Credits also to http://blogs.embarcadero.com/nickhodges/2010/04/23/39416:

  • Sometimes we do stupid mistakes. Having a source control safety net is a must.
  • Tag important milestones. Even in home development you may want to mark a set of files and revisions as being a specific software version.
  • You train for your professional life. Putting in your head the work methodology associated with using source control prepares you professionally.
  • Storage efficiency. Current source control systems store revisions as a delta difference to the previous revision. This means that it is more disk efficient as the entire file is not stored but only the differences.
  • You have the history for all your source tree. You can rapidly see what was changed and when was changed. Compare files from different revisions and merge easily.
  • You can branch to experiment. If you have some experiments in mind you can create a branch (a new independent development line) and test it. In the end, if you are satisfied with the results, merge it in the HEAD (main development line). You get all this for free without having to create a copy and receive the same benefits from using the source control even while experimenting.

It's totally worthwhile.

Note that you don't have to set up a fully fledged SVN server either. You can just create a repository in the local file system, and connect with the file:// URL syntax. This means you don't have to go through the hassle of setting up an SVN daemon (which is probably overkill for a single user project)

You could also look at lighter weight options such as git that keep all the working files locally without having to even create a separate repository. Git gives you a few more options for how you set up your source control down the track as well.


Using source control is also good for backup purposes. If you always check everything in, then you can back up all your source code projects by backing up all your repositories. If you have multiple machines, then you don't have to worry about where the latest version of your code actually is - it's on the repository server.


I've kept my whole master's thesis under source control - both code and the thesis itself - so I'm a strong advocate of doing this, and not just for code.

For individual projects, the main advantage is the freedom to change things and experiment, knowing that you can always revert back to the previous version if it doesn't work. And it gives you implicit backups of your work (just make sure your svn repo is at the very least on a different hard drive than your main work)


Absolutely, it's worth doing. It gives you the ability to try wild and crazy refactorings, and then back out of them with ease if they don't work. It also sets up good habits for if/when you work more collaboratively with a group.

With Subversion (at least) you don't even need to have a "server"- a simple directory can serve as your repository if you access it with "file://" type urls. There's even a free book that contains pretty much everything you need to know to get started:

http://svnbook.red-bean.com/nightly/en/index.html