Jump to content
  • 0

Git file permission



6 answers to this question

Recommended Posts

git only looks at the executable bit, all other mode bits will be ignored. See http://stackoverflow.com/questions/3207728/retaining-file-permissions-with-git for further information.

To change the executable bit of a file in your repo and commit it you can do the following:

chmod -x file.cpp # remove executable bit
chmod +x script.sh # add executable bit
git add file.cpp script.sh
git commit

Link to comment
Share on other sites


This topic is now archived and is closed to further replies.

  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue. Privacy Policy Terms of Use