Git给添加shell执行权限提交repo

git ls-files --stage
100644 f23de29bb2d1d6434b8b29ae775ad8c2e48c5391 0       test.sh

644权限,默认不能执行

git update-index --chmod +xtest.sh

git ls-files --stage
100755 f23de29bb2d1d6434b8b29ae775ad8c2e48c5391 0       test.sh

现在文件是755可执行权限.

git commit -m "xxx!"

 1 file changed, 0 insertions(+), 0 deletions(-)
 create mode 100755 test.sh
原文地址:https://www.cnblogs.com/huangpeng1990/p/8004954.html