This alternative, as it happens a lot with git, doesn't expose its purpuse clearly, but at least it provides a way to get the current branch, so I guess I will move to this approach instead.
Thanks for sharing!
For further actions, you may consider blocking this person and/or reporting abuse
We're a place where coders share, stay up-to-date and grow their careers.
I was used to do the following
git branch | grep -e "^\*" | cut -d " " -f 2
This alternative, as it happens a lot with git, doesn't expose its purpuse clearly, but at least it provides a way to get the current branch, so I guess I will move to this approach instead.
Thanks for sharing!