I just found (and have fallen hard for) PowerShell with the posh-git module installed. I’d really like something similar on my Mac. Does such an equivalent exist?
I just found (and have fallen hard for) PowerShell with the posh-git module installed.
Share
There are certainly ways to get features similar to what posh-git gives you.
For instance, installing
bash-completiongives you the ability to<tab>complete Git commands.Once you install
bash-completion, you can add this to your.bash_profile:PS1='\u@\h \W$(__git_ps1 " (%s)")\$ 'This will include the current branch name in your prompt:
user@computer-name current-folder (branch-name)$You can also add the following (found here) to your
.bash_profile(before the PS1):This will add flags after the branch name to show the repo’s current state:
You can also enable Git coloring with the following command:
git config --global color.ui auto