Get all files that have been modified in git branch

Raif picture Raif · May 17, 2012 · Viewed 133.6k times · Source

Is there a way to see what files have changed in a branch?

Answer

twalberg picture twalberg · May 17, 2012

An alternative to the answer by @Marco Ponti, and avoiding the checkout:

git diff --name-only <notMainDev> $(git merge-base <notMainDev> <mainDev>)

If your particular shell doesn't understand the $() construct, use back-ticks instead.