We can get list of changed files between 2 branches/commits by
$ tar --ignore-failed-read -vczf archive.tgz $(git diff --name-only --diff-filter=ACMRT master develop)
Let's see important part:
-
git diff master develop
:
Get differences between master and develop branches. -
--name-only
:
Output only the names of the affected files instead of a full diff. -
--diff-filter=ACMRT
:
Only show files added, copied, modified, renamed or that had their type changed (eg. file → symlink) in this commit. This leaves out deleted files.