I'm having a tough time with .gitignore - It simply does not ignore the directories within the file. I have the .gitignore file on both my development and staging enviroment.
The contents are:
logs
/logs/
/logs/*
logs/
vendor
/vendor/
vendor/
vendor/*
/vendor/*
However, each time I do a git pull on staging I am guaranteed that the merge conflict occured for a file logs/access.log - The same counts for composer packages. If I do a composer update with the very next git pull there is normally a conflict.
If I do a git status on my dev machine (after the last push and having visited the site in my dev enviroment) git status indicates changes in the logs/access.log file under "changes not staged for commit" - Why is the file not being ignored entirely?
What am I doing wrong here? The above code is exactly the same for both dev and staging .gitignore files located in the root of my project.
Any advice?