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? Wha
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:
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.
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
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.
http://code.google.com/p/msysgit/issues/detail?id=184
The answer can be found here, in which the author of the solution claims that:
the environment variable
TERM
was set todumb
that was instead of
TERM=cygwin
You can change that to
TERM=msys
to solve the problem at hand.
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).