문제

I have a project being developed in a Windows based IDE. Included in this project are some perl scripts.

After cloning the project onto the production servers (linux based), I change the permissions of the perl files to be executable by the user only.

Now if I make a change on the windows server and push it to the repository, when I try to pull the change to get it on the server I am told "error: Your local changes to the following files would be overwritten by merge".

How can I get around this? I am working towards getting pulls that are semi-automated, triggered by another script, but I need to have the files executable and able to pull any updates without causing this issue. I could have the script remove the executable permission, pull, then put it back, but I am hoping there is a better solution than this!

도움이 되었습니까?

해결책

By default, changing permissions on a file will be registered as change to the file as any other change within the file.

If you do not want this behaviour you can desable it by executing :

git config core.fileMode false

within your git repository.

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top