Reputation: 2535
Let's say that I have a rails plugin called "wipy
" on GitHub. It has a master branch and it has production branch. I am using Rails 2.3.10.
I need to install production
branch of this plugin. This is what I do currently:
git clone git://github.com/nadala/demo.git
git co -b production origin/production
cp -rv wipy ~/my_project/vendor/
I could do:
ruby script/plugin install git://github.com/nadal/wipy.git
However I do not know how to pass an indicator that I want production branch.
I tried following but it did not work:
ruby script/plugin install git://github.com/nadal/wipy.git --branch production
Upvotes: 1
Views: 301
Reputation: 1323973
Would this blog post help?
Recently I needed to install the Rails 2.3 stable version of the exception notification plugin and so I needed to specify a particular branch in the git repository.
script/plugin install git://github.com/rails/exception_notification.git -r 2-3-stable
The
-r
option allows you to identifiy the specific branch you're after.
In your case:
ruby script/plugin install git://github.com/nadal/wipy.git -r production
Upvotes: 2
Reputation: 46914
ruby script/plugin install git://github.com/nadal/wipy.git
cd vendor/plugins/wipy
git checkout production
Upvotes: 0