How to manage locked files and permissions of a git repo between windows and mac

0

I'm doing some app development for both Android and Mac. I have a git repo which I am constantly pushing and pulling from both my Windows machine and my MacBook.

I find that my files are constantly locked and have strict permissions on Mac, and i need to sudo every git command. Even my xschemes file is getting locked, to much annoyance.

How can I set up these files so I'm not dealing with permissions headaches every iteration?

T_R_U_T_H

Posted 2019-02-06T22:44:36.263

Reputation: 3

Fix permissions on the Mac repo with sudo to get them back to something you can control without sudo. Then commit that change and push it to the repo. In general what you are describing should not happen. – JakeGould – 2019-02-07T01:39:55.667

Answers

0

If you're comfortable with git no longer tracking file permissions, you might consider running this command in one of your local git directories then pushing that up to origin:

git config core.filemode false

This command should only affect the current git project. You can allow for this behavivour globally on either machine with:

git config --global core.filemode false

Note that your Windows git setup could vary so you might just want to be safe and run this command on your Mac, then push to remote.

baelx

Posted 2019-02-06T22:44:36.263

Reputation: 2 083