22

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.

3 Answers 3

19

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

net stop beep
1
  • 12
    To disable it permamently go to the device manager-> view-> show hidden devices and in "Non-Plug and Play Drivers" disable the Beep.
    – schoetbi
    Commented Dec 20, 2010 at 6:47
8

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

1
  • 4
    git config --global core.pager 'less -q'
    – Jiang Jun
    Commented Mar 11, 2015 at 7:27
2

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).

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.