When the code conflicts, how to automatically select the merged code, abandon the current code, do not need to select manually

problem description

recently, when I was sorting out my personal blog, I found that I had some doubts about the use of git. I would like to ask your bosses for advice. The source code of the
blog is on the hexo branch, and the master branch is deployed to the server. The above code is the static folder generated by the hexo branch after executing the command. Deploy_git content, that is to say, the code on the master branch is equivalent to the compiled code, so there are a lot of conflicts when compiling and merging.
how to replace the code on master directly when git pull origin master on the server without having to deal with conflicts manually

to put it simply, how to automatically select the merged code when the code conflicts, and discard the current code

Git
Jul.13,2021

  1. do not store deploy files in the source code.
  2. push deploy to another warehouse

add .gitignore files in the project root directory, and set the paths and files to be ignored in

Menu