cygwin git thinks that file previously had different mode

I manually built latest version of git for cygwin. The only problem is that it thinks that file mode changed (from 644 to 755). Git that is installed in windows doesn’t see any changes. actual file mode is 755 (both windows Git and cygwin git shows the same).

So, as a result,
1) on windows git doesn’t show any changes whether core.filemode is set to true or false
2) on cygwin git shows changes for modes if core.filemode is set to true or unset and doesn’t show any changes when core.filemode is set to false
Actual file mode is 755.

So, my question is, is there a bug(featue) in windows git (msysgit) that emulates core.filemode = false disregarding of option set. Or does cygwin git displays wrong previous file mode. I suppose it’s the first, as files are of xml type.

  • Hudson Git Plugin not working on windows
  • File mode with msysgit
  • Can I set up a git repository to be available from several computers?
  • gvimdiff mergetool for msysgit
  • Git blame showing no history
  • How to prevent `git checkout` from checking out specific file types?
  • What does git-config(1) mean when it says “colors are used only when the output is to a terminal”?
  • How to change line-ending settings
  • One Solution collect form web for “cygwin git thinks that file previously had different mode”

    mysysgit doesn’t support file permissions well. It assumes all .exe is 755 and all text is 644. In my experience, I always have filemode=false in the global config for mysysgit.

    Using a separate global config for cygwin which has filemode=true since cygwin supports chmod and you can track the executable bit as needed, but you’d have to commit changes to it from cygwin.

    I also noticed, when you clone or init a repo in cygwin, it automatically adds core.filemode=true to the local config, which has precedence over global, which will break my suggestion above.

    I was able to fix this by git config --local -e and deleting the filemode entry, leaving the global config as the only definition to use.

    The downside is every repo you clone will have it set to true, so you’ll need to delete it out of there per repo. I haven’t found a way to prevent this on cygwin.

    Git Baby is a git and github fan, let's start git clone.