Skip to content

Instantly share code, notes, and snippets.

@matinrco
Created June 14, 2019 14:59
Show Gist options
  • Save matinrco/c2f38c725b7525ea3b72a8b738d08563 to your computer and use it in GitHub Desktop.
Save matinrco/c2f38c725b7525ea3b72a8b738d08563 to your computer and use it in GitHub Desktop.
Change file permissions when working with git repo’s
# check the existing permissions , the command will show you the current file permissions like 100644
git ls-files --stage
# update the file permission
git update-index --chmod=+x 'name-of-shell-script'
# check-in the files
git commit -m "Made a file executable"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment