Skip to content

bugfix: git HEAD not pointing to a branch#13

Open
SwiftPush wants to merge 1 commit intooh-my-fish:masterfrom
SwiftPush:bugfix-git-prompt
Open

bugfix: git HEAD not pointing to a branch#13
SwiftPush wants to merge 1 commit intooh-my-fish:masterfrom
SwiftPush:bugfix-git-prompt

Conversation

@SwiftPush
Copy link
Copy Markdown

The bug

Steps to recreate

  1. Have Git's HEAD not pointing to a branch, but instead a commit
    1. For example, during a rebase or in detached head state

What Happens

An error is printed to the console and no prompt appears

>>> git checkout 92a572d
fatal: ref HEAD is not a symbolic ref
>>>

What should happen

  1. No error should be printed
  2. The prompt should display the git commit hash
>>> git checkout 92a572d                         (master+18)
fatal: ref HEAD is not a symbolic ref
>>>                                              (92a572d+1742)

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant