I am writing a script that uses git. It needs to know the old file path and the new file path of all renamed directories and files.
Example of what I want to do: git diff --find-renames-only someGitHash someGitHash
Then I would like to see a list like:
rename old/path/old-file-name.extension->new/path/new-file-name.extension
or
rename from source/README.md
rename to documentation/README.md
Or something like this as long as it has the old file name with the old directory path and the new file name with the new directory path for each .
I have messed around and searched everywhere so far the closest thing I could find is git diff --find-renames
git diff --find-renames
gives me the data I want but with way too much data for each file. It is definitely not something I want to deal with and parse through. Some of the git repos I am working with could have thousands of file/folder renames...
Example:
...tons more data that I do not want to parse through
rename from source/README.md
rename to documentation/README.md
...tons more data including diffs of files before and after...
this pattern continued for each file...
How do I list all file and directory renames between two git commits without the extra data?
Any help would be much appreciated, Thanks!