To show your active Git branch in your command prompt, you will need to do the following:
- If you are on a Mac, you can add the code shown below to your
.bash_profile
file. - If you are on Linux, you will add the code shown below to your
.bashrc
file. - If you are on Windows, you probably aren't reading this because Windows provides this behavior by default.
parse_git_branch() {