Quantcast
Channel: How do I get the current branch name in Git? - Stack Overflow
Viewing all articles
Browse latest Browse all 96

Answer by karthikr for How do I get the current branch name in Git?

$
0
0

Over time, we might have a really long list of branches.

While some of the other solutions are great, Here is what I do (simplified from Jacob's answer):

git branch | grep \*

Now,

git status

works, but only If there are any local changes


Viewing all articles
Browse latest Browse all 96

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>