5

Heres whats going on: I am on a mac and in the terminal, I am executing a git pull to a main branch. Al those files come to my local directory and for some reason the permissions are being changed to this: -rwxr-xr-x@ when it should be this: -rw-r--r--. So, when I push these files up to my local branch on github and try to submit a pull request to the main, many files say show this: 100644 → 100755.

I've tried How do I remove files saying "old mode 100755 new mode 100644" from unstaged changes in Git? , but still no luck.

I tried to download the files from the main branch as a zip and replace all my local files but no luck again.

Any suggestions? Thanks.

user3667725
  • 111
  • 1
  • 9
  • 3
    My suggestion would be that you figure out why the permissions are being changed to begin with, rather than trying to figure out how to make `git` ignore or otherwise deal with the changes... – twalberg Sep 04 '14 at 19:04
  • Possible duplicate of [How do I remove files saying "old mode 100755 new mode 100644" from unstaged changes in Git?](https://stackoverflow.com/questions/1257592/how-do-i-remove-files-saying-old-mode-100755-new-mode-100644-from-unstaged-cha) – Lasse V. Karlsen Aug 01 '18 at 07:13

1 Answers1

1

please try the command as following. git config --add core.filemode false

  • 5
    Welcome to Stack Overflow! Please don't answer just with commands. Try to provide a nice description about how your solution works. See: [How do I write a good answer?](https://stackoverflow.com/help/how-to-answer). Thanks – sɐunıɔןɐqɐp Aug 01 '18 at 07:27
  • `core.fileMode` is not the best practice and should be used carefully!. Refer to detailed answer [here](https://stackoverflow.com/a/1580644/3048967) . – ScrapCode Sep 19 '19 at 07:17