Read more

Git: Show current branch name only

Arne Hartherz
October 25, 2012Software engineer at makandra GmbH

While git branch will show you all branches and highlight the current one with an asterisk, it can be too cumbersome when working with lots of branches.

Illustration web development

Do you need DevOps-experts?

Your development team has a full backlog? No time for infrastructure architecture? Our DevOps team is ready to support you!

  • We build reliable cloud solutions with Infrastructure as code
  • We are experts in security, Linux and databases
  • We support your dev team to perform
Read more Show archive.org snapshot

To show only the branch you are currently on, use:

git rev-parse --abbrev-ref HEAD
Posted by Arne Hartherz to makandra dev (2012-10-25 10:02)