Git: See all changed files on a branch

Posted on May 5, 2020

You, like me, might want to see all the files that you have modified on a branch (rather than just since you last commited).

Here is a nice little snippet that does just that!

git diff --name-only --diff-filter=d `git merge-base origin/master HEAD`

If you use fzf.vim, you can also use it to quickly browse through those files. Useful for those times when you are like “what was that serializer I edited 3 days ago when I opened this branch?”

command! -bang EditedFiles call fzf#run(fzf#wrap({ 'source': 'git diff --name-only `git merge-base origin/master HEAD`'}))