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

后端 未结 7 1943
情歌与酒
情歌与酒 2020-12-08 00:12

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?

相关标签:
7条回答
  • 2020-12-08 01:11

    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
    
    0 讨论(0)
提交回复
热议问题