Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

git: list all files added/modified on a day (or week/month...)

Tags:

git

git-log

Given a period of time (e.g. a day, a week, a month), is it possible to list all files that were modified or added in this time?

like image 519
thias Avatar asked Nov 04 '11 22:11

thias


2 Answers

I'd use diff to yield the file list directly, e.g:

git diff --name-only "@{3 days ago}" "@{2 days ago}"  changelog.txt newfile.txt 

In case you're curious which file got modified or added, use --name-status instead:

git diff --name-status "@{3 days ago}" "@{2 days ago}"  M       changelog.txt A       newfile.txt 
like image 123
inger Avatar answered Sep 20 '22 21:09

inger


Maybe this:

  git log --since="1 day ago" --name-only --pretty=format: | sort | uniq 

Include --until if you want for a day, week etc.

like image 35
manojlds Avatar answered Sep 22 '22 21:09

manojlds