2

I am using git-cmd.exe as my terminal program in Windows 7. How can I configure this to show the current branch in my prompt?

jww
  • 90,984
  • 81
  • 374
  • 818
bier hier
  • 17,692
  • 38
  • 82
  • 153
  • 1
    I believe you can retrieve the branch name with `git rev-parse --abbrev-ref HEAD` using Git Bash for Windows. It is the same command you can use elsewhere; see [How to get the current branch name in Git?](https://stackoverflow.com/q/6245570/608639) You can change the prompt by setting `$PS1` in `/etc/profile` or you Bash RC file; see [Where exactly Git Bash for Windows' prompt is defined?](https://stackoverflow.com/q/22689548/608639) – jww Oct 16 '18 at 03:06

0 Answers0