Getting "command not found" error message when running "git log" on Windows

Viewed 5939

I have installed git and all the commands work properly except git log. When I type git log, this message appears:

command not found

what could be the possible reason for such a strange behaviour?


$ git --version
git version 2.16.1.windows.4

$ which git
/mingx64/bin/git
2 Answers

I just found the solution and wanted to share it with those who may come across the same error. It seems git log uses PAGER to show the messages and what I did was to use the git config --global core.pager '' command to stop git from using PAGER.

I've encountered this issue (or something similar to it).

Check inside your git config file, which you can find by running git config --list --show-origin

Check to see if you have any properties appended to that file that look incorrect.

For my issue, I had:

[core]
fsmonitor ==

Which was incorrectly setting a git property to an inappropriate value, causing the output to be: =: =: command not found

Related