List changed files for the current git branch

List files, changed in the current branch (HEAD), comparing to the source branch (main):

git diff --name-only main HEAD

Alternatively:

git whatchanged --name-only --pretty="" main..HEAD

git

Somewhat related: