title: How to resolve conflict while merging branch automatically? in GitLab? do you want a yaml script, a CI action recipe, or just the git command?
body: <p>If I merge two branch.It shows,</p>
  <pre><code>Merge blocked: merge conflicts must be resolved
  </code></pre>
  <p>If I give resolve conflicts</p>
  <pre><code>ENTRYPOINT [&quot;java&quot;,&quot;-Dspring.profiles.active=**development**&quot;,&quot;-jar&quot;,&quot;/app/integration-service.jar&quot;]
  ENTRYPOINT [&quot;java&quot;,&quot;-Dspring.profiles.active=**stage**&quot;,&quot;-jar&quot;,&quot;/app/integration-service.jar&quot;]
  kind: Deployment
  metadata:
    name: integration-app
    namespace: stellacenter-**dev**
    namespace: stellacenter-**stage-uat**
    labels:
      app: integration-app
  spec:
  kind: Service
  metadata:
    name:  integration-service
    namespace: stellacenter-**dev**
    namespace: stellacenter-**stage-uat**
  spec:
    type: NodePort
    selector:
  </code></pre>
  <p>It is the easy way to <strong>use ours</strong> in GitLab and commit to the source branch and done it , but I want to resolve the conflict automatically not manual while merging .Is there any thing to add like rules ? How to do .Please help me to sort out . I've attached yaml script which I'm using.</p>
  <pre><code>services:
    - docker:19.03.11-dind
  workflow:
    rules:
      - if: $CI_COMMIT_BRANCH == $CI_DEFAULT_BRANCH || $CI_COMMIT_BRANCH == &quot;developer&quot; || $CI_COMMIT_BRANCH == &quot;stage&quot;|| ($CI_COMMIT_BRANCH =~ (/^([A-Z]([0-9][-_])?)?SPRINT(([-_][A-Z][0-9])?)+/i))
        when: always
      - if: $CI_COMMIT_BRANCH != $CI_DEFAULT_BRANCH || $CI_COMMIT_BRANCH != &quot;developer&quot; || $CI_COMMIT_BRANCH == &quot;stage&quot;|| ($CI_COMMIT_BRANCH !~ (/^([A-Z]([0-9][-_])?)?SPRINT(([-_][A-Z][0-9])?)+/i))
        when: never 
  stages:
    - build
    - Publish
    - deploy
  cache:
    paths:
      - .m2/repository
      - target
  build_jar:
    image: maven:3.8.3-jdk-11
    stage: build
    script: 
      - mvn clean install package -DskipTests=true
    artifacts:
      paths:
        - target/*.jar
  docker_build:
    stage: Publish
    image: docker:19.03.11
    services:
      - docker:19.03.11-dind
    variables:
      IMAGE_TAG: $CI_REGISTRY_IMAGE:$CI_COMMIT_SHORT_SHA
    script: 
      - docker login -u $CI_REGISTRY_USER -p $CI_REGISTRY_PASSWORD $CI_REGISTRY
      - docker build -t $IMAGE_TAG .
      - docker push $IMAGE_TAG
  deploy_dev:
    stage: deploy
    image: stellacenter/aws-helm-kubectl
    before_script:
      - aws configure set aws_access_key_id ${DEV_AWS_ACCESS_KEY_ID}
      - aws configure set aws_secret_access_key ${DEV_AWS_SECRET_ACCESS_KEY}
      - aws configure set region ${DEV_AWS_DEFAULT_REGION}
    script:
      - sed -i &quot;s/&lt;VERSION&gt;/${CI_COMMIT_SHORT_SHA}/g&quot; appointment-service.yml
      - mkdir -p  $HOME/.kube
      - cp $KUBE_CONFIG_DEV $HOME/.kube/config
      - chown $(id -u):$(id -g) $HOME/.kube/config 
      - export KUBECONFIG=$HOME/.kube/config
      - kubectl apply -f appointment-service.yml
  </code></pre>