Git rewrite files modified on server

Hello!

One of problem files:

In local .gitignore file is specified "admin/.htaccess".

BUT if on remote server to change the file admin/.htaccess, on the next git commit+push (with another files) the file admin/.htaccess on server is rewritten to a local version.

AND if changing admin/.htaccess localy, this file is included in git changes list.

This local and remote files must to be different and shouldn't be synchronized.

Why gitignore does not work and how it is possible to correct?

0

Please sign in to leave a comment.