How to chmod 0777 a file and commit as is to Git on Windows?

前端 未结 2 998
天涯浪人
天涯浪人 2021-02-05 07:07

I\'m working on Windows and on the production there\'s a Linux system and I\'d like to chmod some files to 0777, but I don\'t know how to do it on Windows. I rather not do it on

2条回答
  •  夕颜
    夕颜 (楼主)
    2021-02-05 07:46

    If you want to mark the file as executable, you can use

    git update-index --chmod=+x 
    

    If you really want to have the file writable for everyone, you would have to set up a post-update hook on the linux system, because git does not track file permissions, only the executable bit.

提交回复
热议问题