Here's a complete working solution with an example keybinding for spacemacs.
The master branch is hard-coded in as the default branch to compare for file
changes against. If you want to diff against the nearest parent branch you
would need something like this from https://stackoverflow.com/questions/10641361
git diff --name-only <notMainDev> $(git merge-base <notMainDev> <mainDev>)
Emacs Code. This is mostly a simplification of
helm-projectile-find-files and the resulting calls into
(defun my:helm-projectile-changed-master ()
"Finds files changed from master in the current project."
(let ((changed-files (my:project-files-changed-from-master)))
(helm :sources (helm-projectile-build-dwim-source changed-files)
:buffer "*helm projectile*"
:prompt (projectile-prepend-project-name "Find file: "))
(message "No files have changed from master."))))
(defun my:project-files-changed-from-master ()
"Returns a list of files changed from master in the current project."
(defun my:get-files-changed-from-master-in-dir (directory)
"Returns list of files changed from master branch in DIRECTORY."
(let* ((root (projectile-project-root))
(command "git diff --name-only master")
(changed-files-no-empty (delete "" changed-files))
(file-relative-name (expand-file-name file directory)
(spacemacs/set-leader-keys "pj" #'my:helm-projectile-changed-master)