Quantcast
Viewing all articles
Browse latest Browse all 10

Rails plugin install from specific git branch

Recently while working on a Ruby on Rails plugin, I came across the need to install the plugin from a specific git branch instead of the default master branch.

./script/plugin install -h

yielded the helpful information I needed. Last July, a patch was committed to Rails that added the -r ( or –revision ) parameter.

The -r parameter will take either the name of a git branch or a tag string to checkout instead of the default master branch.

So issuing the following command:

./script/plugin install git://github.com/cpjolicoeur/my_plugin.git -r BRANCH_NAME

will checkout the BRANCH_NAME branch of the git repository.

Very helpful when testing and debugging new features and bugfixes in a plugin.


Viewing all articles
Browse latest Browse all 10

Trending Articles