Git file permissions on Windows

后端 未结 6 2027
清歌不尽
清歌不尽 2020-12-04 04:58

I\'ve read through a few questions regarding file permissions in Git and I\'m still a bit confused. I\'ve got a repo on GitHub forked from another. Post merge, they should b

6条回答
  •  执念已碎
    2020-12-04 05:37

    If you use Cygwin git (or Linux git, too, I assume), there's a good chance your core.filemode setting has been set at the project level in $projdir/.git/config . I found that I had to do the following to get my Cygwin git and my Windows git to coexist nicely on a Windows filesystem without nonexistent filemode changes showing up all the time:

    • delete the line setting core.filemode in $projdir/.git/config
    • in Windows git, run "git config --global core.filemode false"

    This allows my Cygwin git to continue to see filemode changes, which are usually relevant, while instructing the Windows git to ignore the filemode changes it sees, which are usually false positives.

提交回复
热议问题