Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

List new files added (by anyone) between two dates

Tags:

git

How can I list the files that were newly added in commits between two dates (or between two commits)? I'd like to see

  1. The file path
  2. The committer/commit message
  3. The commit ref
like image 887
Synesso Avatar asked Nov 13 '12 23:11

Synesso


People also ask

How do I get a list of files changed in a commit?

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.

How do I find recently added files in git?

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.

What is git diff -- name only?

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.


1 Answers

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.

like image 103
Gra Avatar answered Sep 30 '22 23:09

Gra