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