Function: projectile-find-changed-file

projectile-find-changed-file is an autoloaded, interactive and byte-compiled function defined in projectile.el.

Signature

(projectile-find-changed-file &optional ARG)

Documentation

Jump to a file changed in the current project.

That is everything git reports as staged, unstaged or untracked. With a prefix ARG you are asked for a revision to compare against instead - a branch, say - and the candidates become everything that differs from it, which is the "what did this branch touch" list.

Only git projects are supported.

Key Bindings

Source Code

;; Defined in ~/.emacs.d/elpa/projectile-20260820.1509/projectile.el
;;;###autoload
(defun projectile-find-changed-file (&optional arg)
  "Jump to a file changed in the current project.

That is everything git reports as staged, unstaged or untracked.  With a
prefix ARG you are asked for a revision to compare against instead - a
branch, say - and the candidates become everything that differs from it,
which is the \"what did this branch touch\" list.

Only git projects are supported."
  (interactive "P")
  (let* ((root (projectile-acquire-root))
         (base (when arg (projectile--read-git-ref root))))
    (unless (eq (projectile-project-vcs root) 'git)
      (user-error "`projectile-find-changed-file' needs a git project"))
    (let ((files (projectile-git-changed-files root base)))
      (unless files
        (user-error "No changed files in %s%s" root
                    (if base (format " compared to %s" base) "")))
      (find-file (expand-file-name
                  (projectile-completing-read
                   (if base (format "Changed vs %s: " base) "Changed file: ")
                   files :caller 'projectile-find-changed-file)
                  root))
      (run-hooks 'projectile-find-file-hook))))