Skip to content

Instantly share code, notes, and snippets.

@inri13666
Created March 27, 2019 08:56
Show Gist options
  • Save inri13666/72e58d26acc884a3833e75ff68aba5a9 to your computer and use it in GitHub Desktop.
Save inri13666/72e58d26acc884a3833e75ff68aba5a9 to your computer and use it in GitHub Desktop.

@fooMonster article worked for me

git ls-tree HEAD

100644 blob 55c0287d4ef21f15b97eb1f107451b88b479bffe script.sh As you can see the file has 644 permission (ignoring the 100). We would like to change it to 755:

git update-index --chmod=+x script.sh

commit the changes

git commit -m "Changing file permissions"

[master 77b171e] Changing file permissions 0 files changed, 0 insertions(+), 0 deletions(-) mode change 100644 => 100755 script.sh

source https://stackoverflow.com/questions/10516201/updating-and-committing-only-a-files-permissions-using-git-version-control

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment