Basically I\'m after this but for PowerShell instead of bash.
I use git on windows through PowerShell. If possible, I\'d like my current branch name to displayed as
With Git 2.22 (Q2 2019), any script (Powershell or not) could use the new --show-current option.
$branch = git branch --show-current
If empty, it means "detached HEAD".