Tuesday, May 19th, 2009...1:07 pm

Rails plugin install from specific git branch

Jump to Comments

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.

2 Comments

© 2018 Craig P Jolicoeur.