Search code examples
gitphpstormfile-permissions

Locking/unlocking files with PhpStorm


I am wondering how this works exactly. In PhpStorm you can lock or unlock your current file in the lower right corner.

I see the read and write permissions change whenever you do this but git does not pick up on the change. I have seen locked files in repositories before, like the Laravel code base. All the base code is locked when I pull in the repository.

How can I get git to pick up the changes to my file permissions or does it push them to the repository even though it does not show any changes? How does this work?

Edit: It seems git only tracks whether a file is executable or not, is there an easy way to make git track all file permission changes?


Solution

  • Git only tracks whether a file is executable or not. Even with filemode enabled. The only way to have git track read/write changes is with some hooks or another hacky method.