Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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?

like image 814
dole doug Avatar asked Sep 21 '11 12:09

dole doug


People also ask

How do you see what files were changed in git?

Find what file changed in a commit To find out which files changed in a given commit, use the git log --raw command.

Which command gets the list of commits made in the last 2 weeks?

The most basic and powerful tool to do this is the git log command. By default, with no arguments, git log lists the commits made in that repository in reverse chronological order; that is, the most recent commits show up first.

How do I see revision history in git?

Git file History provides information about the commit history associated with a file. To use it: Go to your project's Repository > Files. In the upper right corner, select History.

How do I see recent commit changes?

Viewing a list of the latest commits. If you want to see what's happened recently in your project, you can use git log . This command will output a list of the latest commits in chronological order, with the latest commit first.


1 Answers

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 
like image 68
Peng Qi Avatar answered Oct 03 '22 02:10

Peng Qi