3

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?

2
  • What do you mean by "changed the most" ? Commented Jan 2, 2016 at 10:41
  • For which icons the most lines of code got changed/removed/added Commented Jan 2, 2016 at 12:36

2 Answers 2

2

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 
Sign up to request clarification or add additional context in comments.

Comments

1

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> 

Comments

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.