I'm having a very strange issue and I wish to know your advice on this please.
Sometimes, when I push changes to REMOTE server, the changes don't appear.
I do ssh to the remote machine, I do a git status
, and I see:
modified: app/runtime/application.log
The thing is, all directory, and now also, specific files there, are being targeted by .gitignore .
/nbproject/
/app/runtime/
/public_html/assets/
/app/runtime/application.log*
/app/runtime/error.log*
No ftp as being done directly, only push and pull has been used.
Maybe they are things written to app/runtime/application.log
on the live site, so the application.log
is different from the one in the repository, and when that happens git refuses to pull, because it will then overwrite application.log
to an older version.
This may happen to a number of other files on that same directory. Files that could be created by the live site, the moment the application runs.
My question is, how can we avoid this? Why .gitignore seems to NOT be effective here?
ps - If I need to provide some more details, like server hooks or something, please let me know.