Skip to content

Cannot use hub pr checkout after PR was updated #2448

@nh2

Description

@nh2

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions