0

In most cases just ignoring the changes is probably enough, but I have a few repos where the filemode changes need to be tracked.

What I'm looking for is a way to stop the automatic change that happens in different operating systems on check out. If I check out the repo on Windows it sets the filemode to 0755 and flags all files as changed in git status. If I check the same repo out on Linux it behaves the same except they are set to 0644 which is what they should be. How can I make Windows keep the 0644 permissions on checkout/in?

The only workaround I know of would be to keep (and maintain) a set of scripts to manually set the permissions, but that shouldn't be needed since the functionality is already there.

beef623
  • 21
  • 6
  • You're question doesn't seem to match your problem. Maybe remove the git part from it? The last question seems to be more fitting than your headline, at least to my understanding – Dugnom Aug 07 '23 at 13:21
  • 1
    The question is entirely related to git. If I do a git pull, it automatically changes the filemode differently depending on the machine I pull from and I need to stop this behavior. – beef623 Aug 07 '23 at 14:15
  • Would this Q&A help you? https://stackoverflow.com/questions/12733452/prevent-git-from-changing-permissions-on-pull – Dugnom Aug 16 '23 at 13:33
  • Maybe explain what permission 0755 on Windows means, specifically as NTFS (FAT neither) does not have such permissions natively. – U. Windl Aug 22 '23 at 13:20

0 Answers0