Reputation: 5245
I'm forking a composer third party repo on my github to use instead of the original repo following the instructions on [this page][1]
I committed my changes and also added the repositories key to my main application's composer.json
however when i run composer update
I don't see my changes
here is the log
Reading composer.json of garyrutland/yii2-foursquare-sdk (dev-master) [9.3MB/3.15s] Importing branch dev-master (dev-dev-master) [9.3MB/3.15s] Reading composer.json of garyrutland/yii2-foursquare-sdk (master) [9.3MB/3.15s] Importing branch master (dev-master)
[9.4MB/4.10s] Updating dependencies (including require-de [1]: http://www.yiiframework.com/wiki/673/using-your-own-forked-version-of-extensions-with-composer/
here is my main composer.json file
"minimum-stability": "stable",
"repositories": {
"garyrutland/yii2-foursquare-sdk": {
"type": "vcs",
"url": "https://github.com/karneaud/yii2-foursquare-sdk/"
}
},
"require": {
......
"garyrutland/yii2-foursquare-sdk":"dev-master@dev",
.....
},
here is my .lock file
{
"name": "garyrutland/yii2-foursquare-sdk",
"version": "dev-master",
"source": {
"type": "git",
"url": "https://github.com/karneaud/yii2-foursquare-sdk.git",
"reference": "f48de12dcf608079ac99b245deced7117ec92784"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/karneaud/yii2-foursquare-sdk/zipball/f48de12dcf608079ac99b245deced7117ec92784",
"reference": "f48de12dcf608079ac99b245deced7117ec92784",
"shasum": ""
},
Whatelse I got to do to update the third party repo with my own??
Upvotes: 1
Views: 607
Reputation: 37038
Rename the branch. dev-master
still refers to master
. There is some magic around dev
, so I'd recommend to avoid it.
git checkout dev-master
git branch wip
git push --all -u
and change it in composer.json
:
"require": {
......
"garyrutland/yii2-foursquare-sdk":"wip@dev",
.....
},
Or other way round, merge your commits from dev-master
into master
and keep working with master
. It is much simpler.
Upvotes: 2