Skip to content

Instantly share code, notes, and snippets.

@birchestx
Created May 31, 2016 18:32
Show Gist options
  • Save birchestx/72f37c8ac10683a836c783cf8814c945 to your computer and use it in GitHub Desktop.
Save birchestx/72f37c8ac10683a836c783cf8814c945 to your computer and use it in GitHub Desktop.
Using a Git Branch in composer
"repositories": [
{
"type": "composer",
"url": "https://repo.magento.com/"
},
{
"type": "vcs",
"url": "[email protected]:webshopapps/module-shipper.git"
}
],
"require": {
"magento/product-community-edition": "2.0.7",
"composer/composer": "@alpha",
"shipperhq/module-shipper": "dev-SHQ16-613",
},
What's important is that the branch is prepending with dev e.g. branch SHQ16-613 becomes dev-SHQ16-613 in composer
See http://www.lornajane.net/posts/2014/use-a-github-branch-as-a-composer-dependency for source
@wsagen
Copy link

wsagen commented Jun 1, 2016

I use dev-master and then once downloaded it defaults to master. Then I can checkout and merge branches as normal.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment