Function: magit-gitignore-in-topdir
magit-gitignore-in-topdir is an autoloaded, interactive and
byte-compiled function defined in magit-gitignore.el.
Signature
(magit-gitignore-in-topdir ARG1)
Documentation
Add the Git ignore RULE to the top-level ".gitignore" file.
Since this file is tracked, it is shared with other clones of the repository. Also stage the file.
Key Bindings
Source Code
;; Defined in ~/.emacs.d/elpa/magit-20260411.1452/magit-gitignore.el
;;; Gitignore Commands
;;;###autoload(autoload 'magit-gitignore-in-topdir "magit-gitignore" nil t)
(transient-define-suffix magit-gitignore-in-topdir (rule)
"Add the Git ignore RULE to the top-level \".gitignore\" file.
Since this file is tracked, it is shared with other clones of the
repository. Also stage the file."
:description "shared at toplevel (.gitignore)"
(interactive (list (magit-gitignore-read-pattern)))
(magit--gitignore rule (expand-file-name ".gitignore" (magit-toplevel)) t))