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

Time:08-30

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?

CodePudding user response:

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

  •  Tags:  
  • git
  • Related