Search code examples
gitcygwinmsysgit

git status different on msysgit and cygwin over the same repository


On the same folder,

on cygwin shell> {edited something} git add .; git commit -m 'committed from cygwin'
on cygwin shell> git status

On branch master
# nothing to commit, working directory clean


on git bash (msysgit) > git status

On branch master
Changes not staged for commit: ...

    modified:   <filename>
    modified:   <filename>

Same situation on reverse:

  • commit from msysgit
  • git status on msysgit is clean
  • on cygwin, git status reports something modified.

Each of the two git has its own .gitconfig, and both have autocrlf = false, so I think it is not about auto conversion of end-of-line.

Question: How to make both report the same status?

versions
msysgit = 1.9.4.msysgit.0
on cygwin = 2.1.1


Solution

  • If the problem is in permissions then this might help you.

    git config core.filemode false
    

    As answered in here. You might add --global option too.