Git diff showing horrible escape characters

Posted in: Bailey's Blog- Apr 09, 2012 2 Comments

Funny little one this…

When running a git diff command I was getting horrible escape characters everywhere. ┬áTurns out this is because my terminal was in colour mode – (set up by the server admin) – and this was causing the escape characters.

Simply ran the git diff command with the –no-color option to get the output back to a nice normal diff output.

2 Responses to “Git diff showing horrible escape characters”

  1. Reply Judit says:

    This command worked for me in several machines:
    ‘export LESS=-R\ $LESS’

    It will display git diff in colours without strange characters =)

  2. Reply Ali says:


    Worked for me on a tcsh shell.

    setenv LESS -R

Leave a Reply