1

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

Ksthawma
  • 1,257
  • 1
  • 16
  • 28
  • 1
    If `git diff` is empty on _msysgit_ then it must be file permissions. Different shells might see files as having different permissions. If files are seen as 0755 and in repository they are stored as 0644, then git sees that as a modification. – lonelyelk Jan 07 '15 at 15:28
  • @lonelyelk Oh yes! though `git diff` is not empty, the only difference is `old mode 100755 new mode 100644`. How to ignore file permissions in diff and status? – Ksthawma Jan 07 '15 at 15:34

1 Answers1

2

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.

Community
  • 1
  • 1
lonelyelk
  • 598
  • 9
  • 25