Skip to content

[Enhancement] Create branch on detached Head #344

Closed

Description

@esierp

When I'm in a detached HEAD state in Git, I encounter an error when trying to create a branch from it. I can make commits while in the detached HEAD state, but these commits don't appear in the graph and subject window, indicating they're on a detached head. Additionally, I can't create a branch from these commits within the tool. However, when using another tool, I can see the commit and create a branch from it, which then becomes visible in the graph and subject window. If this occurs in a submodule, I can see the commit ID and the changes in the top-level module.

2.mp4

Activity

  1. self-assigned this
    on Aug 9, 2024
  2. love-linger commented on Aug 9, 2024

    @love-linger
    Collaborator
  3. esierp commented on Aug 9, 2024

    @esierp
    Author

    Head is now shown in the graph - which is realy fine!
    I can create a branch on the detached head - which is good!
    If i create a commit on the detached head, without create a branch previously. I can't create the branch over the local branches window - but with right click on commit and create a branch it works

    Really great work!

    3.mp4
  4. love-linger commented on Aug 9, 2024

    @love-linger
    Collaborator

    I've pushed a new commit e05264e to fix the issue that users can not create branch based on detached HEAD with extra commits. You can test it from https://github.com/sourcegit-scm/sourcegit/actions/runs/10316558339

  5. esierp commented on Aug 9, 2024

    @esierp
    Author

    Bugfix is working like a charm!

    Thank you!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

enhancementNew feature or request

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions