Raif Raif - 1 year ago 62
Git Question

git - get all files that have been modified in branch

So I have some of my guys only work in a branch so that they don't #$#% up the main dev branch. Then when they have a piece of work, I want to be able to look at every file they have changed and see what the damage is. there could be 1000 files in this project but they only touched twelve. They may have made 10 commits to this branch. I want to look at the branch and say ok, he touched these 12 files. I'll look at each one and make sure it's not a complete mess. Is there an easy way to do this?

Answer Source

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.