Pregunta

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!

¿Fue útil?

Solución

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.

Licenciado bajo: CC-BY-SA con atribución
No afiliado a StackOverflow
scroll top