How to Display the Current git Branch on the Command Line
When you're using git routinely, it's helpful to know which branch you're currently on without having to type git status or git branch.
Fortunately, there's a convenient way to add your current git branch to your command line prompt. For help with remote branches, check out this guide on how to check out a remote branch.