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

Cannot use hub pr checkout after PR was updated #2448

Closed
nh2 opened this issue Jan 20, 2020 · 2 comments
Closed

Cannot use hub pr checkout after PR was updated #2448

nh2 opened this issue Jan 20, 2020 · 2 comments
Labels

Comments

@nh2
Copy link

nh2 commented Jan 20, 2020

Command attempted:

$ hub pr checkout 1234

# now somebody force-pushes the PR to incorporate feedback

$ hub pr checkout 1234
fatal: Refusing to fetch into current branch refs/heads/mybranch of non-bare repository

What happened:

hub fails with an internal git error.

As a user I want to get the new changes from the PR with the incorporated feedback.

hub should either do that, or tell me why I somehow can't get that (and perhaps actionable infon on what I should do instead), instead of failing with an internal git error message.

More info:

git version 2.23.1
hub version 2.12.7

on NixOS Linux 19.09.

@nh2 nh2 added the bug label Jan 20, 2020
@nh2
Copy link
Author

nh2 commented Jan 20, 2020

A workaround seems to be to git checkout another branch, then git branch -D mybranch to delete the branch hub had created, and using hub pr checkout 1234 again so that it recreates it.

@mislav
Copy link
Owner

mislav commented Feb 20, 2020

Duplicate of #2061

@mislav mislav marked this as a duplicate of #2061 Feb 20, 2020
@mislav mislav closed this as completed Feb 20, 2020
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

2 participants