![]() Setting it to true is same as auto, and this is also the default since Git 1.8.4. The auto part says that git will only try and use color on terminals that support it, and you will not get ANSI sequences if you redirect output of git commands to a file for example. You probably want to use git config -global color.ui auto ![]() And of course, you need a terminal which supports colour.Īlso see this answer for a way to add colorization directly from the command line. ![]() You can also fine control what you want to have coloured in what way, e.g. You can create a section in your ~/.gitconfig with e.g. We have many solutions to this problem, But we recommend you to use the first method because it is tested & true method that will 100% work for you. I know you bored from this bug, So we are here to help you! Take a deep breath and look at the explanation of your problem. However, is there any more general solution for adding color to a command output? How to solve : Or even Changes not staged for commit: to red and # Changes to be committed: to green?ĮDIT: Googling found this answer which works great: git config -global -add color.ui true. Is there a way to colorize the output? For example, files that are unstaged are red, staged are green? The output looks the same, but the information is totally different: the file has gone from unstaged to staged for commit. :~/rails/spunky-monkey$ git add app/modelsĪnd :~/rails/spunky-monkey$ git status No changes added to commit (use "git add" and/or "git commit -a") " to discard changes in working directory) Is there a way to color output for git (or any command)?Ĭonsider: :~/rails/spunky-monkey$ git status All we need is an easy explanation of the problem, so here it is.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |