Search code examples
gitfilelogginggit-logfileupdate

Git show files that were changed in the last 2 days


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?


Solution

  • 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