Variable: magit-git-global-arguments

magit-git-global-arguments is a customizable variable defined in magit-git.el.

Value

("--no-pager" "--literal-pathspecs" "-c" "core.preloadIndex=true" "-c"
 "log.showSignature=false" "-c" "color.ui=false" "-c"
 "color.diff=false" "-c" "diff.noPrefix=false")

Documentation

Global Git arguments.

The arguments set here are used every time the git executable is run as a subprocess. They are placed right after the executable itself and before the git command - as in "git HERE... COMMAND REST". See the manpage git(1) for valid arguments.

Be careful what you add here, especially if you are using Tramp to connect to servers with ancient Git versions. Never remove anything that is part of the default value, unless you really know what you are doing. And think very hard before adding something; it will be used every time Magit runs Git for any purpose.

This variable was added, or its default value changed, in magit version 4.3.2.

Source Code

;; Defined in ~/.emacs.d/elpa/magit-20260822.1158/magit-git.el
(defcustom magit-git-global-arguments
  `("--no-pager" "--literal-pathspecs"
    "-c" "core.preloadIndex=true"
    "-c" "log.showSignature=false"
    "-c" "color.ui=false"
    "-c" "color.diff=false"
    "-c" "diff.noPrefix=false"
    ,@(and (eq system-type 'windows-nt)
           (list "-c" "i18n.logOutputEncoding=UTF-8")))
  "Global Git arguments.

The arguments set here are used every time the git executable is run
as a subprocess.  They are placed right after the executable itself
and before the git command - as in \"git HERE... COMMAND REST\".
See the manpage `git(1)' for valid arguments.

Be careful what you add here, especially if you are using Tramp to
connect to servers with ancient Git versions.  Never remove anything
that is part of the default value, unless you really know what you
are doing.  And think very hard before adding something; it will be
used every time Magit runs Git for any purpose."
  :package-version '(magit . "4.3.2")
  :group 'magit-commands
  :group 'magit-process
  :type '(repeat string))