Function: magit-file-checkout

magit-file-checkout is an interactive and natively compiled function defined in magit-files.el.

Signature

(magit-file-checkout REV FILE)

Documentation

Checkout FILE from REV.

Key Bindings

This command is not in any keymaps.

Source Code

;; Defined in /nix/store/irvbdy0zra0dn8fpd008f32x5ix6qm5v-emacs-packages-deps/share/emacs/site-lisp/elpa/magit-20261005.508/magit-files.el
;;;###autoload
(defun magit-file-checkout (rev file)
  "Checkout FILE from REV."
  (interactive
    (let ((rev (magit-read-branch-or-commit
                "Checkout from revision" magit-buffer-revision)))
      (list rev (magit-read-file-from-rev rev "Checkout file" nil t))))
  (magit-with-toplevel
    (magit-run-git "checkout" rev "--" file)))