Be part of JetBrains PHPverse 2026 on June 9 – a free online event bringing PHP devs worldwide together.

mrkarma4ya's avatar

Cannot get ANSI colors to work in VS Code Git Bash integrated terminal

I spent around 2-3 hours yesterday searching for a solution, but I haven't found any.

I know this isn't strictly Laravel related, but Laravel is the first thing I'm learning other than basics, so I don't know where else to ask. I'm only using git bash for Laravel as of now.

I'm using Git Bash as the integrated terminal in VS Code. However, ANSI colors are not working and instead I'm getting the codes to replace them.

Here's a screenshot: https://imgur.com/3yqbRfM I followed both the answers in this post: https://stackoverflow.com/questions/42102657/bash-terminal-colors-in-integrated-terminal-in-vs-code

The first answer got rid of the color codes but did not display colors, only in the external terminal. No change in integrated terminal, even after putting the aliases.

The second answer also kinda worked, it got me the colors. Everything is repeated twice, so it's difficult. Here's an example: https://imgur.com/cBcrrb7 Please help me get the colors working, or maybe just get rid of ansi overall in php artisan commands, without having to put --no-ansi in every command.

0 likes
4 replies
mrkarma4ya's avatar

@untymage As I mentioned, I don't want to enter --no-ansi everytime (a permanent solution for this would be nice) and the other answer seems only for external git bash, not for VS Code integrated git bash. I even tried changing the path of git bash from bin/bash.exe to git-bash.exe, it opens it externally that way.

Please or to participate in this conversation.