Question for my git folks: my app needs to know what the current git branch is in a working folder. It, apparently, is possible that there *is* no current git branch. I don't know the conditions in which that happens, or how to make it happen so I can write a test case for it.

Edit: LazyWeb wins again! Answer: get to a detached head state by doing a checkout of any commit that isn't HEAD.

Thank you all so much!

0

If you have a fediverse account, you can quote this note from your own instance. Search https://mastodon.social/users/GeePawHill/statuses/114230134839319212 on your instance and quote it. (Note that quoting is not supported in Mastodon.)