Reputation: 938
I have used chmod to change permissions on a file. This file is in my Git repository. I changed it from 777 to 444. Git does not show any changes to the file. How do I add this change to Git?
Using Git verion 1.7.9.5
Upvotes: 2
Views: 606
Reputation: 81
from https://docs.gradle.org/current/userguide/gradle_wrapper.html#sec:unix_file_permissions
The Wrapper task adds appropriate file permissions to allow the execution of the gradlew *NIX command. Subversion preserves this file permission. We are not sure how other version control systems deal with this. What should always work is to execute “sh gradlew”
.
Upvotes: 1
Reputation: 406
You could remove the file from your repository and replace it with the file that you changed.
Upvotes: 2
Reputation: 24689
Git will only track whether the executable bit has changed. So, if you had a file that was 666
and changed it to 777
, git would track this change, but otherwise does not track file permissions. If you need to track permissions with git, this will require third-party tools. This post explains it a bit. You'd need a third-party tool like git-cache-meta.
Upvotes: 1