How can just set write permission (unix chmod 0777) to a folder and git commit it in windows?
I know for set executeable file and commit it, can use this:
git update-index --chmod=+x <file>
But now, How can just set read and write permission (unix chmod 0777) to a folder and git commit it in windows?!
And also I try
git config core.filemode true and
chmod 077 <folder> in
Cygwin but does not work.
Note that I am talking about folder and not file permissions.
2 Solutions collect form web for “How can just set write permission (unix chmod 0777) to a folder and git commit it in windows?”
You cannot. Git does not store the complete permissions for files, it only stores whether a file is executable or not. For folders, it stores no permissions at all.
umask will influence the permissions that are used when folders are created on your local machine, but this is not something that can be committed to the repository.
Since windows does not use the permissions bit(s) it has no effect under windows.
One way to “force” git to track those changes is to work with the git Bash which will cause git to work in a Unix like environment and due to that you will be able to track changes made to the file permissions.
Here is a working demo for you