如何阻止 git 在 cygwin 上使文件不可执行? [英] How to stop git from making files non-executable on cygwin?
问题描述
我通过 cygwin 在 Windows 上使用 git,并很快决定使用 filemode=false
(因为在最初的 git 克隆之后我有很多更改).我绝对对跟踪权限根本不感兴趣,我唯一需要的是让某些文件可以执行.有时,我发现某些文件上的 x
标志丢失了,我强烈认为这是因为 git.
I use git on Windows via cygwin and soon decided to use filemode=false
(since otherwise I've got a lot of changes after the initial git clone). I'm definitely not interested in tracking permission at all, the only think I need is for some files to be executable. From time to time, I find that the x
flag on some files gets lost and I strongly suppose it's because of git.
如果有一个解决方案允许在需要时执行 chmod a+x ...
,我会很高兴.
I'd be happy with a solution allowing to execute chmod a+x ...
when needed.
推荐答案
我相信你想要 git update-index --chmod=+x
,然后是提交.
I believe you want git update-index --chmod=+x <file>
, followed by a commit.
这篇关于如何阻止 git 在 cygwin 上使文件不可执行?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!