Just turned an some.sh file into an executable (chmod 755 ...), the permissions were updated but not the content. Is there a way to commit the file into git, so that the executable bit will be restored/set on clone / checkout / pull ?
Update: how can I track that the new permissions were submitted to github?
By default, git will update execute file permissions if you change them. It will not change or track any other permissions.
If you don’t see any changes when modifying execute permission, you probably have a configuration in git which ignore file mode.
Look into your project, in the
.gitfolder for theconfigfile and you should see something like this:You can either change it to
truein your favorite text editor, or run:Then, you should be able to commit normally your files. It will only commit the permission changes.