3

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?

3
  • By your own admission it appears that Tmux changed the permissions, not Git. Git is not the problem, and Git is not the solution.
    – Zombo
    Oct 14, 2015 at 0:53
  • 1
    This is interesting.. I'm not sure how tmux could have changed file permissions. It's a very well built, non-invasive tool that has nothing to do with permissions of random files. I'd be surprised to find our tmux is the root cause of this.
    – user777337
    Oct 15, 2015 at 12:32
  • 1
    I have the same problem on my Windows PC at the office using Cygwin+git. At first, I assumed it was due to onerous internal Active Directory group policies, but now I am less sure. Related: cygwin.com/ml/cygwin/2015-09/msg00072.html
    – kevinarpe
    Oct 23, 2015 at 5:34

1 Answer 1

2

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.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.