Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Allow to use upstream branch to checkout when fork is used #95

Open
xepozz opened this issue Nov 4, 2020 · 7 comments
Open

Allow to use upstream branch to checkout when fork is used #95

xepozz opened this issue Nov 4, 2020 · 7 comments

Comments

@xepozz
Copy link
Member

xepozz commented Nov 4, 2020

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 xepozz mentioned this issue Nov 4, 2020
@samdark samdark added type:feature New feature status:ready for adoption Feel free to implement this issue. labels Nov 4, 2020
@rugabarbo
Copy link
Member

@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?

@samdark
Copy link
Member

samdark commented Dec 2, 2020

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.

@rugabarbo
Copy link
Member

rugabarbo commented Dec 2, 2020

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:

if ($package->isConfiguredRepositoryPersonal()) {
$gitCommand = ['git', 'pull', 'upstream', 'master'];

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

@vjik
Copy link
Member

vjik commented Sep 19, 2022

@xepozz it's actual?

@xepozz
Copy link
Member Author

xepozz commented Sep 19, 2022

Yeap

@samdark samdark reopened this Sep 20, 2022
@DAGpro
Copy link
Contributor

DAGpro commented Sep 25, 2022

Ага

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
Copy link
Contributor

DAGpro commented Oct 3, 2022

Ей

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

@xepozz

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

No branches or pull requests

5 participants