2015-12-08 76 views

回答

2

在腳本中存在shebang並不能使文件「可執行」。這只是一個如何執行文件的指令,如果它是。

您需要更改文件的模式以允許執行。

On Linux/Unix

chmod +x {file} 

On Windows

git update-index --chmod=+x {file} 

您還可以ls-files --stage審覈文件的方式:

# before chmod 
git ls-files --stage 
100644 {commit} {length} {name} 

# after chmod 
git ls-files --stage 
100755 {commit} {length} {name}