Commit 09eccf4745a715013361c332b23b82ffb310af4b
1 parent
03770698
Exists in
spb-stable
and in
3 other branches
Instructions should create a merge commit and give people a chance to test the b…
…ranch we are going to merge.
Showing
1 changed file
with
14 additions
and
10 deletions
Show diff stats
app/views/projects/merge_requests/show/_how_to_merge.html.haml
| ... | ... | @@ -10,34 +10,38 @@ |
| 10 | 10 | - target_remote = @merge_request.target_project.namespace.nil? ? "target" :@merge_request.target_project.namespace.path |
| 11 | 11 | %p |
| 12 | 12 | %strong Step 1. |
| 13 | - Checkout target branch and get recent objects from GitLab | |
| 14 | - Assuming remote for #{@merge_request.target_project.path_with_namespace} is called #{target_remote} | |
| 15 | - remote for #{@merge_request.source_project_path} is called #{source_remote} | |
| 13 | + Update the repo and checkout the branch we are going to merge | |
| 14 | + Assuming remote for #{@merge_request.target_project.path_with_namespace} is called #{target_remote} | |
| 15 | + remote for #{@merge_request.source_project_path} is called #{source_remote} | |
| 16 | 16 | %pre.dark |
| 17 | 17 | :preserve |
| 18 | - git checkout #{target_remote} #{@merge_request.target_branch} | |
| 19 | 18 | git fetch #{source_remote} |
| 19 | + git fetch #{target_remote} | |
| 20 | + git checkout -b {@merge_request.source_branch} #{source_remote}/#{@merge_request.source_branch} | |
| 20 | 21 | %p |
| 21 | 22 | %strong Step 2. |
| 22 | - Merge source branch into target branch and push changes to GitLab | |
| 23 | + Merge the source branch into target branch and push changes to GitLab | |
| 23 | 24 | %pre.dark |
| 24 | 25 | :preserve |
| 25 | - git merge #{source_remote}/#{@merge_request.source_branch} | |
| 26 | + git checkout #{target_remote}/#{@merge_request.target_branch} | |
| 27 | + git merge --no-ff #{@merge_request.source_branch} | |
| 26 | 28 | git push #{target_remote} #{@merge_request.target_branch} |
| 29 | + git branch -d {@merge_request.source_branch} | |
| 27 | 30 | - else |
| 28 | 31 | %p |
| 29 | 32 | %strong Step 1. |
| 30 | - Checkout target branch and get recent objects from GitLab | |
| 33 | + Update the repo and checkout the branch we are going to merge | |
| 31 | 34 | %pre.dark |
| 32 | 35 | :preserve |
| 33 | - git checkout #{@merge_request.target_branch} | |
| 34 | 36 | git fetch origin |
| 37 | + git checkout -b #{@merge_request.source_branch} | |
| 35 | 38 | %p |
| 36 | 39 | %strong Step 2. |
| 37 | - Merge source branch into target branch and push changes to GitLab | |
| 40 | + Merge the source branch into target branch and push changes to GitLab | |
| 38 | 41 | %pre.dark |
| 39 | 42 | :preserve |
| 40 | - git merge origin/#{@merge_request.source_branch} | |
| 43 | + git checkout #{@merge_request.target_branch} | |
| 44 | + git merge --no-ff #{@merge_request.source_branch} | |
| 41 | 45 | git push origin #{@merge_request.target_branch} |
| 42 | 46 | |
| 43 | 47 | ... | ... |