Why does git diff on Windows warn that the "terminal is not fully functional"?
WindowsGitDiffMsysgitWindows Problem Overview
I'm using msysgit 1.7.7.1 on Windows. I get an error when using git diff
. What is causing this? Is there no diff tool included in msysgit? What should I do?
> WARNING: terminal is not fully functional
Windows Solutions
Solution 1 - Windows
If you are having issues in cmd.exe, for instance, see the warning here:
Then simply set your environment variables and include TERM=msys. After that, each time you open a cmd.exe, your variable will be set correctly.
NOW YOU MUST RESTART YOUR SHELL (CMD.EXE). Just run a new one. And from there, you should have no more issues. Again:
Solution 2 - Windows
For Git Bash, this can be fixed by adding the following line to ~/.bashrc:
export TERM=cygwin
-or-
export TERM=msys
The first seems to be the original by git for windows, the second a popular known form to "heal" as well.
The problem can be caused if some other program (like for example Strawberry Perl) sets the TERM
system environment variables.
Solution 3 - Windows
Above answers was not fully worked for me, so I did: Add
export TERM=msys
to "[githome]/etc/profile" at the top but it made changes only for git bash. Then I added
@set TERM=msys
to "[githome]/cmd/git.cmd" after @setlocal (I installed only git run from command line). May be this decision not truly good but it works for me and there are not any terminal warnings. (I use git version 1.7.10.msysgit.1).
Solution 4 - Windows
The answer can be found here, in which the author of the solution claims that:
> the environment variable TERM
was set to dumb
that was instead of
TERM=cygwin
You can change that to
TERM=msys
to solve the problem at hand.
Solution 5 - Windows
I work in powershell and I have the git executable directly in my path.
None of the suggested answers worked, but I found a solution that works for me.
I added a line in my powershell profile:
$env:TERM="msys"
Which fixed the problem for me.
Solution 6 - Windows
A quick & dirty solution in my case turned out to be to use the --no-pager
option.
By default, some git commands (like log
) will use a pager like less
if they expect the output to be long. Pagers require things like scrolling text up and down with the arrow keys, which sometimes doesn't work if the assumptions about what kind of terminal you're on are wrong (this is what the "not fully functional" means).
If you know ahead of time that your output will be short, or you just want it to dump output to the terminal and leave the scrolling up to your terminal program, you can override this and not use a pager at all, e.g.:
git --no-pager log
Solution 7 - Windows
In case someone gets this launching bash from Git Extensions, check the setting for Path to linux tools...
. Mine was set to C:\cygwin
. Changing it to C:\Program Files (x86)\Git\bin\
fixed it for me. I didn't have to set the TERM variable to launch bash this way.