How to define a Bower dependency to a Git repository with no releases tagged?

As it is written in the documentation, you can specify the package in form of a remote Git endpoint:

"dependencies": {
    "some-package": "git://github.com/someone/some-package.git"
 }

Since GitHub is usually used, there is a shortcut for this (unless specified otherwise):

"dependencies": {
    "some-package": "someone/some-package"
 }

This will download the newest version of the package. To make sure that your app will work with the downloaded version, you can specify the commit with its hash. So this

"dependencies": {
    "some-package": "someone/some-package#ddb859e7e7d2beb9c7ecd54cfe4ea2e67ac1d797"
 }

will always download the package in the state of that specific commit.

Update: Changed protocol from SSH (git@github.com:) to plain git (git://github.com/) as pointed out in the comments.

Leave a Comment

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)