How to install a plugin from a git repository branch

Was implementing nested_has_many_through and came across this error:

Cannot dissociate new records through 'Post#post_tags' on '#'. Both records must have an id in order to delete the has_many :through record associating them.

Apparently I needed to use the rails-2.3 branch, which you can install like so:

script/plugin install git://github.com/username/repo.git -r branch_name