I tried looking for a special Git command for this, but I couldn’t find one. Is there anything shorter or faster than the following?

git branch | awk '/\*/ { print $2; }'

11 Answers
11

Leave a Reply

Your email address will not be published. Required fields are marked *