Function: magit-find-git-config-file-other-window

magit-find-git-config-file-other-window is an interactive and byte-compiled function defined in magit-files.el.

Signature

(magit-find-git-config-file-other-window FILENAME &optional WILDCARDS)

Documentation

Edit a file located in the current repo's git directory, in another window.

When ".git", located at the root of the working tree, is a regular file, then that makes it cumbersome to open a file located in the actual git directory.

This command is like find-file-other-window, except that it temporarily binds default-directory to the actual git directory, while reading the FILENAME.

Key Bindings

Source Code

;; Defined in ~/.emacs.d/elpa/magit-20260411.1452/magit-files.el
(defun magit-find-git-config-file-other-window (filename &optional wildcards)
  "Edit a file located in the current repo's git directory, in another window.

When \".git\", located at the root of the working tree, is a
regular file, then that makes it cumbersome to open a file
located in the actual git directory.

This command is like `find-file-other-window', except that it
temporarily binds `default-directory' to the actual git
directory, while reading the FILENAME."
  (interactive
    (let ((default-directory (magit-gitdir)))
      (find-file-read-args "Find file in other window: "
                           (confirm-nonexistent-file-or-buffer))))
  (find-file-other-window filename wildcards))