I'd like to check which files have been modified at the same time as one specific file. Specifically, I want to get the history of this specific file, and for each commit of this history I want to know which files were affected.
When I do git log --name-only, I get the full history of commits, as well as a list of files that have been modified, for each commit.
Now if I do git log <file>, I get the history of the commits that involved this specific file.
git log --name-only <file>, however, do not include the full list of files modified by each commits. Instead it only shows me <file>, which is quite useless to be honest.
Is there any way to make this command include all files?
Use git-rev-list to list commits affecting specific path and then git-show to get all the files modified in each commit:
git show --name-only $(git rev-list HEAD -- PATH)
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With