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

Push to Pull Request #2467

Closed
VasekPurchart opened this issue Feb 7, 2020 · 3 comments
Closed

Push to Pull Request #2467

VasekPurchart opened this issue Feb 7, 2020 · 3 comments
Labels

Comments

@VasekPurchart
Copy link

VasekPurchart commented Feb 7, 2020

The problem I'm trying to solve:

When I checkout a PR, I do it almost always in order to work with the PR further, either I want to make some changes or most often only rebase it.

Currently when I want to push the changes back I have to find out the repo URL and branch name and construct something like:

git push git@github.com:fork/my-project branch-name

Or at least this is the only way I know currently to do it (without other tools).

How I imagine hub could expose this functionality:

I hoped that there would be a

hub pr push

command I could call. Ideally without having to specify the issue number again since I am already in the branch. But I am not sure if this is stored somewhere in the repo (since I cannot see it). What I am proposing in #2466 could help with this.

There would probably also have to be an -f option like with the normal push (since the common rebase usecase)


This is in fact what I hoped this project would solve for me when I saw it. And what I was looking for on https://hub.github.com/ in Designed for open-source maintainers

@mislav
Copy link
Owner

mislav commented Feb 20, 2020

Currently when I want to push the changes back I have to find out the repo URL and branch name and construct something like:

You should be able to just do git push without arguments. hub pr checkout makes it simple to push back to the PR, even those that are coming from forks.

@wkentaro
Copy link

When people send PRs with a branch named master, git pr checkout <pr_number> creates <username>-master branch. In this case, git push won't work as the branch name does not match: <username>-master in local and master in the remote. Is there any way to make this work?

@jpfeuffer
Copy link

Same problem here: @wkentaro Did you find any workaround?

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

No branches or pull requests

5 participants
@mislav @VasekPurchart @wkentaro @jpfeuffer and others