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?
Asked
Active
Viewed 408 times
2
-
1I 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