Skip to content

Creating a branch from a commit / detached HEAD has an unexpected recent history #6335

@donokuda

Description

@donokuda

Description

When I create a branch from a "detached HEAD" state (such as from a commit), the branch is created with a different history (my assumption is that it's master or the default branch)

Version

  • GitHub Desktop: 1.5.0
  • Operating system: macOS 10.13.6

Steps to Reproduce

  1. Check out a commit in terminal (I did git checkout a813cc1 as an example) and switch to Desktop
    image
  2. In Desktop, create a new branch. Desktop should warn you that the new branch will be based off of the currently checked out commit.
    image
  3. After creating a new branch, look at the history.

Expected Behavior

I'd expect the latest commit to be the one that I checked out (I did git reset --hard a813cc1 to simulate this in the UI):
image

Actual Behavior

The latest commit in the branch is more recent than the one I originally checked out:
image

Additional Information

Logs

Metadata

Metadata

Assignees

No one assigned

    Labels

    investigation-neededLikely bugs, but haven't been reliably reproduced by a reviewer

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions