Chen Kinnrot Chen Kinnrot - 9 days ago 5
Git Question

git reports - get changed files

due to bureaucracy, I need to get a list of all changed files in my repository(I started with existing source code).

What should I run to get this list?

Answer

For files changed between a given SHA and your current commit:

git diff --name-only <starting SHA> HEAD

or if you want to include changed-but-not-yet-committed files:

git diff --name-only <starting SHA>

More generally, the following syntax will always tell you which files changed between two commits (specified by their SHAs or other names):

git diff --name-only <commit1> <commit2>