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.

  • Error cannot stat upon git pull
  • SVN: How do I maintain my local config.blah file?
  • How to remove unused objects from a git repository?
  • Remove file from commit
  • git submodule not pulling files in submodules
  • How Github or any other cloud based repository services(Gitlab, Bitbucket) store source code files and directories?
  • Is that possible with git?

  • Git - Save unfinished merge changes and checkout another branch
  • I can't checkout a specific branch, “detached HEAD state”
  • Jenkins Windows slave: Authentication failed if running as service
  • Revert back changes made by merge
  • Undo “roll back to this commit”
  • Remove trailing whitespace on save in Intellij Idea (12)
  • 5 Solutions collect form web for “Git show files that were changed in the last 2 days”

    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
    git diff --stat @{2.days.ago}

    Short and effective

    Use the –raw option to git log:

    $ git log --raw --since=2.days

    See the –diff-filter part of the git log help page for the explanation of the flags shown in the –raw format. They explain what happen to the files in each commit:

           Select only files that are Added (A), Copied (C), Deleted (D),
           Modified (M), Renamed (R), have their type (i.e. regular file,
           symlink, submodule, ...) changed (T), are Unmerged (U), are Unknown
           (X), or have had their pairing Broken (B). Any combination of the
           filter characters (including none) can be used. When *
           (All-or-none) is added to the combination, all paths are selected
           if there is any file that matches other criteria in the comparison;
           if there is no file that matches other criteria, nothing is

    You can do a diff of a version that’s closest to 2 days ago with:

    git diff $(git log -1 --before="2 days ago" --format=%H).. --stat

    --stat gives you a summary of changes. Add --name-only to exclude any meta information and have only a file name listing.

    Hope this helps.

    git log --pretty="format:" --since="2 days ago" --name-only
    Git Baby is a git and github fan, let's start git clone.