1

I have some files in GIT which have -rwxr-xr-x permissions.

I need to change it to 640 (rw-,r--,---)

I run chmod 640

But when I run git diff or git commit, these file permission changes are not shown or committed.

How can I perform the above? Please help.

Newbie
  • 105
  • 1
  • 6
  • 12
  • 2
    Git will not impose those kinds of restrictive permissions. It only sets or clears the `x` bit. The remaining bits are set or cleared according to your `umask` setting on Unix-like systems. Removing or adding the `x` bit will normally show up in `git status` though, unless you set `core.fileMode` to `false`. Windows-based systems behave poorly here, but I avoid Windows and am not sure how to deal with that. – torek Jun 13 '16 at 00:49
  • @torek great stuff. You should place that in an answer. – Rogério Peixoto Jun 13 '16 at 00:50
  • Git cares only 644 and 755. – ElpieKay Jun 13 '16 at 00:50
  • Related: http://stackoverflow.com/q/21691202/1256452 – torek Jun 13 '16 at 00:50
  • @RogérioPeixoto: I'm sure this is a duplicate, I just have not yet found "of what". – torek Jun 13 '16 at 00:51
  • Also related: http://stackoverflow.com/a/3208143/1256452 – torek Jun 13 '16 at 00:53

0 Answers0