msysGit Tip: Files Constantly Reported as Modified Fix

I copied my Mono mcs Git working copy from Linux to Windows for use with MSysGit only to find out that even after git reset –hard almost all files were being reported as modified by git status. It turns out it has to do with the file permissions (executable bit I think) and the inability of msysgit to apply them on Windows.

$ git diff class/Accessibility/makefile.build
diff --git a/class/Accessibility/makefile.build b/class/Accessibility/makefile
old mode 100755
new mode 100644

The fix is to make git ignore some file mode stuff via:

git config core.fileMode false

Another useful setting on Windows is:

git config core.autocrlf true
  • Twitter
  • Facebook
  • FriendFeed
  • StumbleUpon
  • Digg
  • del.icio.us
  • Google Bookmarks
  • Reddit
  • Tumblr
  • PDF
  • Print
  • email
Rating: (No Ratings Yet)
Loading ... Loading ...
Comments
Published: Jul 18th, 2009 (Views: 272)
Categories: Coding
Tags: ,
  • Name
    Note that "repo-config" has been deprecated for a long time now; please use "git config".
  • knocte
    git reset --hard ?

    Are you sure you didn't want to do 'git-clean -d -x -f && git-checkout -f' ?
blog comments powered by Disqus