I'm familiar with using git blame
on the commandline to show which commit changed a particular line of a file.
Is there a similar function to show which commit last changed the file "mode"/flags? E.g. setting or unsetting the executable flag.
To find out which files changed in a given commit, use the git log --raw command.
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.
The git status command displays the state of the working directory and the staging area. It lets you see which changes have been staged, which haven't, and which files aren't being tracked by Git.
You could use git log
with the --summary
flag and search the output for mode changes:
git log --summary -- path/to/file
From the documentation:
--summary
Output a condensed summary of extended header information such as creations, renames and mode changes.
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