Handle detached head more gracefully
Closed this issue · 2 comments
dakrone commented
Currently, if I check out a detached HEAD state in git, I get this prompt:
~/src/elasticsearch:1.x λ| git co c0311b3
You are in 'detached HEAD' state. You can look around, make experimental
changes and commit them, and you can discard any commits you make in this
state without impacting any branches by performing another checkout.
If you want to create a new branch to retain commits you create, you may
do so (now or later) by using -b with the checkout command again. Example:
git checkout -b <new-branch-name>
HEAD is now at c0311b3... Export the hostname as environment variable and mention it in the docs
~/src/elasticsearch:fatal: ref HEAD is not a symbolic ref λ|
It would be great if the git handling in eshell-prompt-extras displayed something better there, maybe the short version of the SHA that is currently checked out?
zwild commented
Yeah.. I found this, any good ideas?
dakrone commented
Thanks for fixing this!