How can I force Composer to install a dev branch over a stable release? I am experimenting with Bootstrap 3 in Drupal 8 and I want to stay on the dev branch of bootstrap.

In my composer.json, I wrote the following line based on Drupal Packagist:

"drupal/bootstrap": "8.3.*@dev",


However, when I run composer update, it downloads 8.3.0-beta2 (2015-Dec-19) instead of the latest dev release (2016-Feb-20).

Gathering patches for root package.
Loading composer repositories with package information
Updating dependencies (including require-dev)
Gathering patches for root package.
Gathering patches for dependencies. This might take a minute.
  - Installing drupal/bootstrap (8.3.0-beta2)
    Downloading: 100%
    Downloading: 100%


To make sure it wasn't some caching issue, I ran:

composer selfupdate
composer clear-cache
composer update


But it did the same thing-- install beta2.

How do I force it to download the dev release instead?
While it will install the latest dev release of the Drupal module/theme to simply do the following:

composer require drupal/bootstrap:3.x-dev


I would argue a best practice when installing a dev version of a module is to make sure you are going to get the commit you want (which might not be the latest), so I would do the following:

composer require drupal/bootstrap:3.x-dev#5670922dea05fffb6506a6cd5d53546b9fae8df9


Or you can manually add it to your require in composer.json (as below) and then on the command line run composer install

"drupal/bootstrap": "3.x-dev#5670922dea05fffb6506a6cd5d53546b9fae8df9",


To get the commit you should go to http://cgit.drupalcode.org/bootstrap/log/ and find the commit you want (the commit hash is the id on the commit's page).
btw: the above hash is not a real commit on the Bootstrap project