How can I list the files that were newly added in commits between two dates (or between two commits)? I'd like to see
To find out which files changed in a given commit, use the git log --raw command. It's the fastest and simplest way to get insight into which files a commit affects.
git whatchanged --diff-filter=A displays commits that added files, and the files they added, newest first. git whatchanged is a bit of an anachronism, you can use git log --diff-filter=A --stat or git log --diff-filter=A --numstat --pretty='COMMIT: %H %cd' for something more machine readable.
To explain further: The -z to with git diff --name-only means to output the list of files separated with NUL bytes instead of newlines, just in case your filenames have unusual characters in them. The -0 to xargs says to interpret standard input as a NUL-separated list of parameters.
this is what I use:
git log --diff-filter=A --name-only --pretty=oneline --abbrev-commit ref1..ref2
Moreover, the output is quite easy to parse. Removing --abbrev-commit
allows you to use the SHA-1 for some job.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With