1

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

enter image description here

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

enter image description here

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)

  • @torek with your explain, we sense you think we are 5 years old. we know that delete a file or part of a code and then merge it, will delete this part or file. this is so simple. But our problem is with commits history. for example a file that modified at yesterday has priority over a file that modified at today. If you deeply look in second picture, you will see two red arrow. the arrow that is in left of the picture, refers to "Merge branch 'develop' of ......". This commit is an auto commit. This auto commit is cause of delete files that right arrow refers to it (the gray colors) – Daniyal Sedighpour May 21 '22 at 03:59
  • @torek: I have nothing to do with jaber-sabzali language. So let's not talk about it. This fact that you said is so simple and we understand that is might be occur. but no body removed any files or part of a files and we are absolutely sure. This problem occurred when we merged branches together then orders of the file history was cluttered. – Daniyal Sedighpour May 21 '22 at 07:09
  • There is no file history in Git: there are commits, and the commits are history (and hold files), but there is no file history. Neither the original statement nor your followup make sense to me. (These comments do not seem to be going anywhere useful, so I will delete my earlier ones.) – torek May 21 '22 at 07:28

0 Answers0