Function: magit-blob-visit-file

magit-blob-visit-file is an autoloaded, interactive and byte-compiled function defined in magit-files.el.

Signature

(magit-blob-visit-file)

Documentation

View the file from the worktree corresponding to the current blob.

When visiting a blob or the version from the index, then go to the same location in the respective file in the working tree.

Key Bindings

Source Code

;; Defined in ~/.emacs.d/elpa/magit-20260411.1452/magit-files.el
;;;###autoload
(defun magit-blob-visit-file ()
  "View the file from the worktree corresponding to the current blob.
When visiting a blob or the version from the index, then go to
the same location in the respective file in the working tree."
  (interactive)
  (if-let ((file (magit-file-relative-name)))
      (pop-to-buffer-same-window (magit-find-file-noselect "{worktree}" file))
    (user-error "Not visiting a blob")))