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>
Using --name-status
instead of --name-only
will show what happened to the files as well as the names.
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…