Say I make a commit to a git repository with a lot of files changed.
How can I find out which file got changed the most in this specific commit? (the most lines of code changed/removed/added)
Is it then also possible to find out what is the filesize change of this file?
One close approximation could be to use --numstat to output the amount of lines changes in each file and sort accordingly. This will produce a list of files sorted from the file with the most lines added to it in this commit to the one with the least:
$ git show <commit hash> --pretty=tformat: --numstat | sort -nr
Is it then also possible to find out what is the filesize change of this file?
To get the file size use this:
git ls-tree -r -l <commit> <file 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