There are many times when I run a "git diff --shortstat" command and it outputs the following:
17 files changed, 0 insertions(+), 0 deletions(-)
Hows that possible that files changed even though there were no insertions or deletions?
This is possible if the file permissions have changed for some of the files in the project:
Sample Example:
$ git init && touch file && git add file && git commit -m "msg"
Initialized empty Git repository in /home/user/Desktop/test/.git/
$ chmod +x file
$ git diff --shortstat
1 file changed, 0 insertions(+), 0 deletions(-)
You can use git config core.filemode false
to turn this feature off.
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