<commit_before>%div#modal_merge_info.modal.hide
  .modal-dialog
    .modal-content
      .modal-header
        %a.close{href: "#", "data-dismiss" => "modal"} ×
        %h3 How to merge
      .modal-body
        - if @merge_request.for_fork?
          - source_remote = @merge_request.source_project.namespace.nil? ? "source" :@merge_request.source_project.namespace.path
          - target_remote = @merge_request.target_project.namespace.nil? ? "target" :@merge_request.target_project.namespace.path
          %p
            %strong Step 1.
            Update the repo and checkout the branch we are going to merge
            Assuming remote for #{@merge_request.target_project.path_with_namespace} is called #{target_remote}
            remote for #{@merge_request.source_project_path} is called #{source_remote}
          %pre.dark
            :preserve
              git fetch #{source_remote}
              git fetch #{target_remote}
              git checkout -b {@merge_request.source_branch} #{source_remote}/#{@merge_request.source_branch}
          %p
            %strong Step 2.
            Merge the source branch into target branch and push changes to GitLab
          %pre.dark
            :preserve
              git checkout #{target_remote}/#{@merge_request.target_branch}
              git merge --no-ff #{@merge_request.source_branch}
              git push #{target_remote} #{@merge_request.target_branch}
              git branch -d {@merge_request.source_branch}
        - else
          %p
            %strong Step 1.
            Update the repo and checkout the branch we are going to merge
          %pre.dark
            :preserve
              git fetch origin
              git checkout -b #{@merge_request.source_branch}
          %p
            %strong Step 2.
            Merge the source branch into target branch and push changes to GitLab
          %pre.dark
            :preserve
              git checkout #{@merge_request.target_branch}
              git merge --no-ff #{@merge_request.source_branch}
              git push origin #{@merge_request.target_branch}


:javascript
  $(function(){
    var modal = $('#modal_merge_info').modal({modal: true, show:false});
    $('.how_to_merge_link').bind("click", function(){<commit_msg>Instead of working with remotes Dmitriy suggested to use urls.<commit_after>%div#modal_merge_info.modal.hide
  .modal-dialog
    .modal-content
      .modal-header
        %a.close{href: "#", "data-dismiss" => "modal"} ×
        %h3 How to merge
      .modal-body
        - if @merge_request.for_fork?
          - source_remote = @merge_request.source_project.namespace.nil? ? "source" :@merge_request.source_project.namespace.path
          - target_remote = @merge_request.target_project.namespace.nil? ? "target" :@merge_request.target_project.namespace.path
          %p
            %strong Step 1.
            Checkout the branch we are going to merge and pull in the code
          %pre.dark
            :preserve
              git checkout -b #{@merge_request.source_project_path}-#{@merge_request.source_branch} #{@merge_request.target_branch}
              git pull #{@merge_request.source_project.http_url_to_repo} #{@merge_request.source_branch}
          %p
            %strong Step 2.
            Merge the branch and push the changes to GitLab
          %pre.dark
            :preserve
              git checkout #{@merge_request.target_branch}
              git merge --no-ff #{@merge_request.source_project_path}-#{@merge_request.source_branch}
              git push origin #{@merge_request.target_branch}
        - else
          %p
            %strong Step 1.
            Update the repo and checkout the branch we are going to merge
          %pre.dark
            :preserve
              git fetch origin
              git checkout -b #{@merge_request.source_branch} origin/#{@merge_request.source_branch}
          %p
            %strong Step 2.
            Merge the branch and push the changes to GitLab
          %pre.dark
            :preserve
              git checkout #{@merge_request.target_branch}
              git merge --no-ff #{@merge_request.source_branch}
              git push origin #{@merge_request.target_branch}


:javascript
  $(function(){
    var modal = $('#modal_merge_info').modal({modal: true, show:false});
    $('.how_to_merge_link').bind("click", function(){
{'fraction_non_alphanumeric': 0.09817351598173515, 'fraction_numerical': 0.00228310502283105, 'mean_word_length': 2.115931721194879, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 5, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '5627740', 'n_tokens_mistral': 1209, 'n_tokens_neox': 1171, 'n_words': 309}