We have SOLR in our app directory on EC2 server and not on our local git repository. When we are pushing our local repository to EC2, it is erasing the Solr directory. We have put the directory name in our .gitignore file, but it still overwrites the SOLR directory.
How do we prevent overwriting certain files that are only on the EC2 server (in the var/app/current directory)?