I need to set the permission of script.sh to 755
. So
git add -A
git update-index --chmod=+x script.sh
git commit -m 'first commit'
This way the file will be committed with a permission 755
and my remote vm can execute those scripts.
However, next time I do something to the repo and commit the changes the permission of those scripts will be reverted to 644
. The message is
[master 171c0cc] second
2 files changed, 1 insertion(+)
mode change 100755 => 100644 script.sh
Anyone know what might be happening here? How do I get rid of this?