Skip to content

Instantly share code, notes, and snippets.

@neverendingqs
Created January 12, 2018 16:26
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save neverendingqs/b5d25d1ea728c7823960d37e80a20e35 to your computer and use it in GitHub Desktop.
Save neverendingqs/b5d25d1ea728c7823960d37e80a20e35 to your computer and use it in GitHub Desktop.
Changing file permissions in Git on Windows
# Taken from http://blog.lesc.se/2011/11/how-to-change-file-premissions-in-git.html on January 12, 2018
>git ls-tree HEAD
100644 blob 55c0287d4ef21f15b97eb1f107451b88b479bffe script.sh
>git update-index --chmod=+x script.sh
>git status
# On branch master
# Changes to be committed:
# (use "git reset HEAD <file>..." to unstage)
#
# modified: script.sh
#
>git commit -m "Changing file permissions"
[master 77b171e] Changing file permissions
0 files changed, 0 insertions(+), 0 deletions(-)
mode change 100644 => 100755 script.sh
>git ls-tree HEAD
100755 blob 55c0287d4ef21f15b97eb1f107451b88b479bffe script.sh
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment