Git show files that were changed in the last 2 days

dole doug picture dole doug · Sep 21, 2011 · Viewed 32.9k times · Source

How can I have a list with all the files that were changed in the last 2 days? I know about

git log --name-status --since="2 days ago" 

but this will show me ids, dates and commit messages. All I need is the list of the file names which were changed.

Is that possible with git?

Answer

Peng Qi picture Peng Qi · Sep 21, 2011
git log --pretty=format: --name-only --since="2 days ago"

if some files duplicate in multiple commits, you can use pipe to filter it

git log --pretty=format: --name-only --since="2 days ago" | sort | uniq