How to find all renames in all commits on git?

Viewed 645

I'm lost in a repo maze with a bunch of files that were readded while their older version was renamed because of a not-so-good rebase that was made.

Anyway, I want to list all the files that at some point were renamed, that is, list all renamed files from all commits.

2 Answers

You should be able to get that info from the logs using --diff-filter option. The filter for renamed files is R, and D for deleted files.

Renamed files:

git log --summary --pretty='format:' --diff-filter=R

Deleted files:

git log --summary --pretty='format:' --diff-filter=D

Renamed + deleted files:

git log --summary --pretty='format:' --diff-filter=RD
Related