Search code examples
windowsgitmacoscmditerm

Adding Git branch to Command Prompt


When looking for an alternative for the cool feature in ITerm(mac) which shows the branch we are on:

enter image description here

I found out that:

If you are on Windows, you probably aren't reading this because Windows provides this behavior by default.

I had no idea that it is in here by default. How to do it?


Solution

  • If you're using git through their console (Git Bash), it is there by default and you don't have to do anything to access it.

    Git Bash console

    If you don't have it already, download Git Bash - that's what I'm using in the image above.