0
Github在放入shebang #!/usr/bin/env node
之後,應該說"Executable File"
代替** lines(** sloc)
。相反,它會放入行和SLOC。我怎麼能說"Executable File"
?Github中node.js的「可執行文件」
Github在放入shebang #!/usr/bin/env node
之後,應該說"Executable File"
代替** lines(** sloc)
。相反,它會放入行和SLOC。我怎麼能說"Executable File"
?Github中node.js的「可執行文件」
在腳本中存在shebang並不能使文件「可執行」。這只是一個如何執行文件的指令,如果它是。
您需要更改文件的模式以允許執行。
chmod +x {file}
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}