0

I am on windows 10 and just had an issue with git bash.

When I was using git bash in the past month, it looked like the screenshot from this question.

However, something happened in the last week or so and now it looks like the one from this question instead.

I looked through the answers of both of those, and more, but none of them told me how to return it.

I tried installing/updating git through their website but that didn't help.

5
  • Please paste the screenshot after running the command git -c color.ui=always status
    – Samit
    Nov 5, 2018 at 20:05
  • Here is the console screenshot
    – J. Krom
    Nov 5, 2018 at 20:10
  • Look at the definition of your PS1, does it contain the color codes?
    – Walter A
    Nov 5, 2018 at 22:35
  • @WalterA what do you mean by PS1 here?
    – J. Krom
    Nov 6, 2018 at 14:22
  • A prompt with colours is constructed with escape codes or tput commands in the definition of PS1. Do you have export PS1=... in your .bashrc ? What is the output of echo "$PS1" ?
    – Walter A
    Nov 6, 2018 at 19:54

2 Answers 2

1

To fix this, I first reinstalled Git completely from scratch. I realised that launching it in administrator made it work properly. Next, I launched bash and ran the following commands: cd ~ explorer .

Which opened the login scripts directory. I deleted all the git created files in that directory, then restarted bash. This was the: .bash_history .bash_logout .bashrc .gitconfig .profile files.

Then, it started working again!

0

Please try to add the below lines in your git config file and then restart the command prompt and run git commands.

[color]
branch = always
diff = always
interactive = always
status = always
ui = always
1
  • I added it using git config -e to get the right one, but it didn't impact anything.
    – J. Krom
    Nov 5, 2018 at 20:14

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.