Problems cloning projects with Cygwin's Git

我是研究僧i 提交于 2019-12-05 19:55:06

That reminds me of Alexpux/MSYS2-packages issue 222:

On Linux if you want to execute a file it must have the correct permissions. By default a touched file will not have this, for security reasons.

However Windows has a wrong-headed take on this, in that a file created with New > Text Document automatically has execute permissions.

So what looks to have happened in this case is that whoever created the batch files did so in a MSYS2 environment, hence the correct lack of execute permissions.
What they did not do is chmod +x to correctly give these files execute permission, as would have been done if the files were created with Windows native tools.

So a simple chmod +x should be enough.

And then, with Git 2.9.1 or more:

git add --chmod=+x -- afile
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!