Follow

Keep Up to Date with the Most Important News

By pressing the Subscribe button, you confirm that you have read and are agreeing to our Privacy Policy and Terms of Use
Contact

"git branch -v" takes a long time, quicker way to get current branch name?

So the repo I’m working in is a selective checkout of a big repo. The server I’m working on has also seen better days. If I wanted to know what branch of a repo I was on, I’d normally do git branch -v, but last time I did that it took 3 minutes and 58 seconds.

Any way I can have just the name of the current branch a bit quicker than that? Surely it’s stored in that .git folder somewhere?

MEDevel.com: Open-source for Healthcare and Education

Collecting and validating open-source software for healthcare, education, enterprise, development, medical imaging, medical records, and digital pathology.

Visit Medevel

>Solution :

Another option is to use git status, which does show which branch is the current branch.

Add a comment

Leave a Reply

Keep Up to Date with the Most Important News

By pressing the Subscribe button, you confirm that you have read and are agreeing to our Privacy Policy and Terms of Use

Discover more from Dev solutions

Subscribe now to keep reading and get access to the full archive.

Continue reading