Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Getting code from my forked repository

I made a fork from a repository called "chrisbjr/api-guard". the repository latest version is v2.2.2, and I made a release v2.2.3 from my fork.

I have my own branch which is dev-fulluth, to get the code from my fork not from the main repo, composer has to contain the below code:

"repositories": [
        {
            "type": "vcs",
            "url": "https://github.com/Yunishawash/api-guard"
        }
    ],
    "require": {
        "laravel/framework": "5.0.*",
        "chrisbjr/api-guard": "dev-fullauth",
        "lootils/geo": "*",
        "zizaco/entrust": "dev-laravel-5"
    },

but when I apply composer update, the code is pulled from the main repository

can any one help me ?

like image 523
Yunis Hawwash Avatar asked May 30 '26 00:05

Yunis Hawwash


1 Answers

Having a look at your repository in https://github.com/Yunishawash/api-guard it looks like it doesn't have a branch called dev-fullauth.

Instead there is a branch dev-bugfix. But you must not name your branch including the dev- prefix. Rename your branch at github from dev-bugfix to bugfix and then your require section would look like this:

"require": {
    "laravel/framework": "5.0.*",
    "chrisbjr/api-guard": "dev-bugfix",
    "lootils/geo": "*",
    "zizaco/entrust": "dev-laravel-5"
},

Note: If you don't rename your branch your requirement would be "chrisbjr/api-guard": "dev-dev-bugfix",.

like image 98
Pᴇʜ Avatar answered May 31 '26 15:05

Pᴇʜ



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!