How do I get the name of the current branch in Git?
Question
Answer
To display only the name of the current branch you're on:
git rev-parse --abbrev-ref HEAD
Reference: Show just the current branch in Git
2023-03-20
How do I get the name of the current branch in Git?
To display only the name of the current branch you're on:
git rev-parse --abbrev-ref HEAD
Reference: Show just the current branch in Git