Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Git error: cant execute git log && git diff [No such file or directory]

Tags:

git

I just cloned a remote repository into my local VM.

When I run git log or git diff, it is showing

error: cannot run most: No such file or directory

I couldn't find any answer related to this issue in the web, thats why Im posting here. Any clues ??

like image 372
santoshthota Avatar asked Oct 18 '22 11:10

santoshthota


1 Answers

Looks like git try to run program named most and cant find it.
Open your ~/.gitconfig and you probably will see there incorrect settings pointing to most

How to fix it?

The easiest way is simply to remove this configuration from the config file. (delete the pager entry)

Another way is to set the desired pager :

# set vim as the pager handler
git config --global core.pager 'vim -'

Demo of simulating the problem and fixing it:

enter image description here

like image 93
CodeWizard Avatar answered Oct 21 '22 05:10

CodeWizard