Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Disable beep in git diff on windows

Tags:

git

windows

While paging through the results of executing git diff, I hear annoying beep sound when I get to the end or beginning of the diff results. I would like to know how I can disable this alarm bell?

I am running msysGit on Windows XP.

like image 838
Mario Avatar asked Aug 12 '09 14:08

Mario


3 Answers

You can turn off that annoying beep for all Windows apps using:

net stop beep
like image 142
Greg Hewgill Avatar answered Oct 12 '22 01:10

Greg Hewgill


By default, msysGit uses less as the pager when running diffs. In order to disable less' bell sound, the command line option -q needs to be supplied to it. This can be accomplished by modifying the git configuration for your user account or the project. Add the following to the configuration file:

[core]
    pager = less -q 

The location of your user accounts git configuration file is ~/.gitconfig. In Windows speak, that is %userprofile%/.gitconfig.

-- Anwser provided by the OP, Mario

like image 35
Maxime Lorant Avatar answered Oct 12 '22 02:10

Maxime Lorant


You do not tell what you are paging with but let me guess it is less, and that is less that actually produces the bell. You can start less with the --quiet or --silent options to avoid (or sett the LESS environmental variable).

like image 2
hlovdal Avatar answered Oct 12 '22 02:10

hlovdal