You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I've noticed this as well. Based on the documentation, is this really a bug though?
I do wish that hub by default pushed to origin rather than upstream. Perhaps instead we should try and make this a feature. Maybe we could add some sort of hub config option where you could specify the default remote for the -p flag?
From the doc:
-p, --push
Push the current branch to HEAD before creating the pull request.
In case there are multiple git remotes that are all pointing to GitHub, hub assumes that the main one is named "upstream", "github", or "origin", in that order of preference.
@lorthirk There is really no established convention for where the preferred push target should be.
If I have write access to "upstream", I prefer pushing there. Some other people prefer pushing to their fork. Some projects even require that all PRs come from a fork, even those authored by people who have write access to the main repo. Whatever we decide as a default, we end up disappointing some people cli/cli#350
I'm not sure if I want to add an option to select the push target, because you can just as easily push the branch yourself before invoking git pull-request. Does that seem like an appropriate workaround?
Command attempted:
❯ hub pull-request -p
What happened:
After writing the PR text, the branch got pushed to
upstream
instead oforigin
:More info:
on macOS 10.15.2
The text was updated successfully, but these errors were encountered: