Im beginner user to git and I need to list all files has been deleted in a project.I want either there names or the total number of each one(ex. total number of files have been deleted) in a period of time. another example ( I want to see all files deleted in the past two years in a project ) Im using Mac iOS and git on my terminal. I tried this "git log --diff-filter=D --summary | grep delete" but how can I add timestamp I tried ls files command but I do not know how I can used it correctly. Thank you
Asked
Active
Viewed 104 times
0
-
You're asking a few questions here. I think `git ls-files` is the answer to one of them, I think `git log --diff-filter=... --format=...` probably answers your other one. Try to limit to one question per question :) – anthony sottile Feb 03 '18 at 03:56
-
thanks, I changed it to one question – user8863554 Feb 03 '18 at 04:11
2 Answers
1
Try git status in terminal for a list of files to be committed. Also try git commit -a for a list of files that have been modified if you haven't committed them yet.
-
thanks for answering but I doing this to see all files in project not the files that I did add or delete – user8863554 Feb 03 '18 at 03:27
1
Try git log
to see all your commits.
And if you do a git show comit
it will show u the changes that happened for that commit. That might be what you're looking for.
Try this git log --diff-filter=D --since="2018-02-01"

psj01
- 3,075
- 6
- 32
- 63
-
I don't want my commits, I want to see all files deleted in the past two years in a project for example. – user8863554 Feb 03 '18 at 04:08
-
check this out.. this might help you: https://stackoverflow.com/questions/6017987/how-can-i-list-all-the-deleted-files-in-a-git-repository – psj01 Feb 03 '18 at 04:11
-
thanks I checked that but how do I specify a timestamp ? I want all files that have been deleted in the last two years? – user8863554 Feb 03 '18 at 04:14
-