Storing different content in a Git branch

If you are used to the Subversion way of doing things, branches tend to have more or less the same content/code, obviously with a few changes as the development progresses.

But in Git one can store content that is completely different from the content in a branch.

Now you might wonder why one would want to do that. But I guess there are some reasons for it. For example, I believe the Git repository itself has a TODO branch that allows developers to keep notes on what needs to be done in the future, but does not contain code. That way notes are versioned as well.

The thing about Git is that it allows for easy setup of such not-ordinary uses of a version control system — I think that is what gives it “more legs” over other DVCSs. And why one should look at using Git over other DVCS systems.

Have a look at this screencast that takes one through how to create such branches — also referred to as “empty branches” because one creates an empty branch, and then fills it with other content that does not relate to the master branch.

But if you want to create a branch like that, you can use the following code that I found buried in one of the comments on the screencast.

git symbolic-ref HEAD refs/heads/newbranch
rm .git/index
git clean -fdx
<<<< do your work >>>>
git add your files
git commit -m 'Initial commit'

Just gotta love Git.

Using Decentralized Version Control with CF – My talk at CFObjective ANZ

A couple of weeks back I presented at CFObjective ANZ in Melbourne, on how to make ColdFusion development a little more cooler using a decentralized version control system (DVCS) like Git.

The basic idea behind the presentation was this:

A commonly used version control system in the ColdFusion community is Subversion — a centralized system that relies on being connected to a central server. The next generation version control systems are decentralized, in that version control tasks do not rely on a central server.

Decentralized version control systems are more efficient and offer a more practical way of software development.

In this session, I covered considerations in moving from Subversion to Git, a decentralized version control system. And also the pros and cons of each.

Version control is often used in conjunction with a testing framework and continuous integration. I wanted to demo an example of how to integrate Git with a testing framework, MXUnit, and a continuous integration server, Hudson. But ran out of time. So maybe that is something I can do another time in another conference!

You can download a PDF it here: Make it Cooler – Using Decentralized Version Control

Or view it at SlideShare.

Would like to hear from you on what you think of it.

Apache Rewrites for Subfolder Install of CFWheels

By default the CFWheels framework and application is installed in the webroot.

But if you want to install it in a subfolder in the webroot, you need to change the rewrites slightly.

I use the following and it works quite well.

In the example below, I have a server called hello.cfwheels.local, and it points to a folder under the webroot called hello.

ServerName hello.cfwheels.local

RewriteEngine On
RewriteOptions Inherit

RewriteCond %{REQUEST_URI} ^.*/(flashservices|flex2gateway|railo-context|robots.txt)($|/.*$) [NC]
RewriteRule ^(.*)$$1 [P,L]

RewriteCond %{REQUEST_URI} ^.*/(files|images|javascripts|miscellaneous|stylesheets|plugins|sitemap.xml|rewrite.cfm)($|/.*$) [NC]
RewriteRule ^(.*)$$1 [P,L]

RewriteRule ^(.*)$$1 [P,L]

RewriteRule ^/(.*)$$1 [P,L]
ProxyPassReverse /

ProxyPreserveHost on

If you think there is a better way to accomplish this, please drop in a line.

Search CFWheels Documentation

CFWheels has excellent documentation. Well organized, sufficiently detailed, well presented.

Something that is missing at the moment, and is on the list of things to-do for the CFWheels team, is to add a search feature to the docs.

Till the time that feature is implemented, I created a Google custom search for CFWheels docs.

I just find that after one has understood the basics and has started building an application, there is a need to be able to quickly search for information rather than go through listing of topics to figure out where can one find a piece of information.

To that end, a search interface proves very useful.

So, if you want to search CFWheels documentation till the time a formal search is put on the site, you are more than welcome to use the custom search that I use.

You can access the search at:

Or use the search box below to search: