Artem Zinnatullin
Artem Zinnatullin

Reputation: 4447

Git Bash how to show info about repo files like in Git Shell

I`m working with Git Bash on Windows. But before, I was working with Git Shell (from github). In Git Shell was this really awesome thing, See the image below:

enter image description here

In Git Shell, I do not need to use git status to see how many untracked, changed or deleted file I had. Git Shell shows that information after any command.

How can I do this for Git Bash (on Windows)?

Upvotes: 4

Views: 1327

Answers (1)

rlegendi
rlegendi

Reputation: 10606

You can simply manipulate the PS1 variable, something like this might help you:

$ PS1="$PS1 [`git diff --shortstat`]> "

The result should be something like this:

rlegendi@localhost /.../gitrepo (master)
[ 1 file changed, 3 insertions(+)] >

So basically you have to add this like to your profile file (either at the Git installation directory typically under c:\Program Files (x86)\Git\etc or in your home directory). That way you can create a bit nicer version.

Take a look on PROMPT_COMMAND and different git diff switches (like --numstat, etc.).

Upvotes: 1

Related Questions