yii-dev-tool icon indicating copy to clipboard operation
yii-dev-tool copied to clipboard

Allow to use upstream branch to checkout when fork is used

Open xepozz opened this issue 3 years ago • 7 comments

Would be nice to have an ability to use upstream/master when you using a fork. master from fork can be outdated and you will work with outdated code base.

I think it can be configured in packages.php like the following:

return [
    // ....
    'yii-web' => [
        'upstream' => 'yiisoft/yii-web',
        'origin' => 'xepozz/yii-web',
    ],
    // ....
];

or any handy ways.

xepozz avatar Nov 04 '20 17:11 xepozz

@xepozz can you describe in detail how you would like to work with upstream? What exactly do you want to do with it with the tool?

rugabarbo avatar Dec 02 '20 14:12 rugabarbo

That is about pulling changes from upstream/master (original repo) into origin/master (fork). That's common workflow despite the fact that you can directly branch from upstream/master for your pull requests.

samdark avatar Dec 02 '20 15:12 samdark

That is about pulling changes from upstream/master (original repo) into origin/master (fork). That's common workflow despite the fact that you can directly branch from upstream/master for your pull requests.

But the existing implementation tries to be smart and already pulls from upstream, if the package is a fork:

https://github.com/yiisoft/yii-dev-tool/blob/d8142e8f5a0f4bd678748a60bd2462099138d8cd/src/Command/Git/PullCommand.php#L32-L33

This is why I am trying to understand @xepozz's use case.

rugabarbo avatar Dec 02 '20 22:12 rugabarbo

@xepozz it's actual?

vjik avatar Sep 19 '22 13:09 vjik

Yeap

xepozz avatar Sep 19 '22 14:09 xepozz

Ага

Do you want to get any branch from the upstream repository, not just the master branch, so the sync command doesn't suit you?

DAGpro avatar Sep 25 '22 21:09 DAGpro

Ей

Вы хотите получить любую ветку из вышестоящего репозитория, а не только основную ветку, поэтому команда sync вам не подходит?

@xepozz

DAGpro avatar Oct 03 '22 23:10 DAGpro