I am presented with the following situation: I have a system that works with apache and php, I use style sheets in less, to simplify I have a folder structure like this:
rootDir/index.php
rootDir/img/
rootDir/css/
rootDir/less/
rootDir/js/
On the test server everything works best, when I make a change and it is ready I put it on the git server.
Now, when I want to do a pull from the production server to make those changes in the other environment I get all those files.
The problem is that the directory less
no longer needed that these are compiled in css, but to pull these are brought anyway. I would like the structure of the production server to be like this
rootDir/index.php
rootDir/img/
rootDir/css/
rootDir/js/
I have tried so much to modify the .gitignore file on my production server to ignore the directory, which did not work, and also execute the git update-index --assume-unchanged less/*
command, but when I execute the git update-index --refresh
command it warns me that all less files need an update.
I can delete them manually whenever I pull, but I would like to avoid it if possible.
I edit my question to clarify the following:
It interests me that all the files are versioned, i.e. that the server git stores them and they are not ignored in a push, I only want that they are not in the production environment.