For a file (I'm not aware that I modified this file) git diff
gives me
diff --git a/file.py b/file.py
old mode 100644
new mode 100755
And no other differences. What does this mean? And how could it happened?
For a file (I'm not aware that I modified this file) git diff
gives me
diff --git a/file.py b/file.py
old mode 100644
new mode 100755
And no other differences. What does this mean? And how could it happened?
This means the *nix permissions changed. Specifically, execute permission for user, group and world was added.
One possible way this might have come about was for someone with sufficient privilege to type:
$ chmod a+x file.py
Another possible incancation:
$ chmod 755 file.py
The mode is part of the metadata.
Git was originally made for linux (and by Linus) and supports its permission system.
644 is the permission rw-r--r- (read-write for owner, read for everyone)
755 is the permission rwxr-xr-x (read write execute for owner, read execute for everyone)
In other words, you have just made the file executable.