Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

git showing all files chmod to 100644 from 100755

Tags:

git

cygwin

tmux

Today I tried to just install tmux on cygwin and afterwards all of a sudden I was getting changes on all of my files. They all changed permissions from 100755 to 100644 out of no where and I have no way of getting rid of them... I thought git checkout -- . or git reset --hard would work, but as soon as I run git status again, all the files have been modified again.

I have since removed tmux, restarted computer, completely re-cloned the repo, etc and nothing has fixed it... I have no idea what the hell is changing all my files! I know some people say just use git config core.filemode false to tell git to not look at the changes, but thats not what I want. My IIS doesn't work with the new file permissions so I can't just ignore them and move on...

Any ideas?

like image 593
Matt Hintzke Avatar asked Dec 20 '25 21:12

Matt Hintzke


1 Answers

With a recent Git (2.9.1 or more), try:

git add --chmod=+x -- my*.files

That should force Git to add those file as 755.
But it is possible that tmux has an umask which forces files to be checked out as 644.
Try cloning again after typing: umask 002.

like image 129
VonC Avatar answered Dec 24 '25 07:12

VonC



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!