Saturday, June 16, 2012

How to get free and private version control in the cloud

Problem
I'm working on a website by myself, and want to use version control. Version control repository on my local machine seems rather silly, so instead I wanted to get a version control that's capable of being stored online ("in the cloud"). There are free services out there, like github.com, but the problem is the free version is open source. What if you don't want to share your code, but still want an online version control for free? Here's how!

Solution
I will explain how I'm doing it, and from this you should be able to easily adapt it for your situation. I'm doing it with a WAMP website.

1. Sign up and get Dropbox - 2 GB for free, automatically syncs folders on your computer to their servers (i.e. the cloud)

2. In the Dropbox folder, which is D:/Dropbox on mine, create a subfolder(s) to put your source files. For example, mine is D:/Dropbox/Code/MyProject

3. (For wamp users only): Create an alias to point to D:/Dropbox/Code/MyProject
  1.   Click the Wamp icon -> Apache -> Alias directories -> Add an alias
  2. Type the url alias, for example: http://localhost/MyProject
  3. Type the project directory, for example: D:/Dropbox/Code/MyProject
  4. Test by navigating to http://localhost/MyProject/ (notice the slash on the end)
4. Open Netbeans (IDE for people who don't use it)-> right-click the project -> Versioning -> initialize git repository -> leave the default

5. Commit all files

Congrats, your version controlled files are now in the cloud for free!!


References
1. Making an alias on wamp: http://www.webdesign.org/web-programming/php/configure-a-virtual-directory-using-wamp.16605.html

No comments:

Post a Comment

There was an error in this gadget