I brought the project on the Git and ci-cd, I have two develop and master branch, which with each commit on the master automatically pull on the server.
For example, the user applies changes to the latest version on develop, and when he wants to push Git says there are newer changes, it must be pulled first, but a commit comes that local develop branch and remote develop branch merge together and all unwanted changes inside. It is placed and changes or sometimes deletes all the files on the project
For example, this image below the user has auto merge and made some changes and asked to push on develop
The same four files, but Git said local branch develop with branch develop remote must be merged And the user has automatically committed Git The image below
But here phpstorm that I have shows this commit has made other changes to the project, for example deleting the files I showed on the right But these files were added a few days ago and I guess the user did not make these changes the moment he wanted to commit, but Git himself came and put the version that the user had on git and deleted those files (I think)