Robin's Blog

How to: Fix ‘WARNING: terminal is not fully functional’ error on Windows with Cygwin/Msysgit

For a while now I’ve been frustrated by an error that I get whenever I’m using git on Windows. When I try and run certain git commands – such as git log or git diff – I get the following message:

Git error message stating "WARNING: terminal not fully functional"

Git error message stating “WARNING: terminal not fully functional”

The error message “WARNING: terminal not fully functional” appears, but if you press return to continue, the command runs ok (albeit without nice colours). I’d just put up with this for ages, but decided to fix it today – and the fix is really simply. Basically, the problem is that the TERM environment variable is set to something strange, and git can’t cope with it – so warns you that there might be trouble.

So, to fix this, you just need to make sure that the TERM environment variable is set to “xterm”, which is the standard graphical terminal on Linux machines. There are a number of ways that you can do this:

  • Set this variable using the built-in Windows interface – see these instructions
  • Use a helpful tool to make this easier (particularly if you often set other environment variables, as I do), like Rapid Environment Editor
  • Set it in an initialisation batch script – such as the init.bat file that is used by the Cmder swish Windows command-line tool

Once you’ve set this (you can even test it by just running set TERM=xterm on the command line), everything should work fine – and you’ll get colours back again:

GitErrorFixed


Categorised as: Computing, How To, Linux, Windows


5 Comments

  1. I had the same problem and your post helped me to fix it. Thanks.

  2. Andrew Dennison says:

    Very helpful. & the link to Rapid Environment Editor too

  3. Dewi says:

    Robin, I’m on a surface pro 3 and I know how to change the path variables but I don’t see a term variable.. can you please clarify.

  4. Robin Wilson says:

    I think if you don’t see one then you should just create an environment variable called TERM and set it to ‘xterm’ and see if that helps.

  5. Hai Vu says:

    This help greatly. Thank you

Leave a Reply

Your email address will not be published. Required fields are marked *