1

I am trying to give permission 400 to a file on git and try to commit the same. But is trying to commit with permssions as " create mode 100644 "

Is it possible to commit file with 400 permissions in git or should I git clone and handle permission change in my code

Zaks
  • 668
  • 1
  • 8
  • 30

1 Answers1

3

Git supports only one permissions bit: "executable" (mode 100755) or "not executable" (mode 100644). This was a deliberate choice—very early Git supported more, and it turned out not to work well.

You will need to chmod the file after checkout, perhaps through one or more hooks.

torek
  • 448,244
  • 59
  • 642
  • 775