Commit a67f3c393f223114a8682f5409700a80a5ee7cc4
Exists in
spb-stable
and in
3 other branches
Merge branch 'need-merge-commit' of /home/git/repositories/gitlab/gitlabhq
Showing
1 changed file
with
12 additions
and
12 deletions
Show diff stats
app/views/projects/merge_requests/show/_how_to_merge.html.haml
@@ -10,34 +10,34 @@ | @@ -10,34 +10,34 @@ | ||
10 | - target_remote = @merge_request.target_project.namespace.nil? ? "target" :@merge_request.target_project.namespace.path | 10 | - target_remote = @merge_request.target_project.namespace.nil? ? "target" :@merge_request.target_project.namespace.path |
11 | %p | 11 | %p |
12 | %strong Step 1. | 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 | + Checkout the branch we are going to merge and pull in the code |
16 | %pre.dark | 14 | %pre.dark |
17 | :preserve | 15 | :preserve |
18 | - git checkout #{target_remote} #{@merge_request.target_branch} | ||
19 | - git fetch #{source_remote} | 16 | + git checkout -b #{@merge_request.source_project_path}-#{@merge_request.source_branch} #{@merge_request.target_branch} |
17 | + git pull #{@merge_request.source_project.http_url_to_repo} #{@merge_request.source_branch} | ||
20 | %p | 18 | %p |
21 | %strong Step 2. | 19 | %strong Step 2. |
22 | - Merge source branch into target branch and push changes to GitLab | 20 | + Merge the branch and push the changes to GitLab |
23 | %pre.dark | 21 | %pre.dark |
24 | :preserve | 22 | :preserve |
25 | - git merge #{source_remote}/#{@merge_request.source_branch} | ||
26 | - git push #{target_remote} #{@merge_request.target_branch} | 23 | + git checkout #{@merge_request.target_branch} |
24 | + git merge --no-ff #{@merge_request.source_project_path}-#{@merge_request.source_branch} | ||
25 | + git push origin #{@merge_request.target_branch} | ||
27 | - else | 26 | - else |
28 | %p | 27 | %p |
29 | %strong Step 1. | 28 | %strong Step 1. |
30 | - Checkout target branch and get recent objects from GitLab | 29 | + Update the repo and checkout the branch we are going to merge |
31 | %pre.dark | 30 | %pre.dark |
32 | :preserve | 31 | :preserve |
33 | - git checkout #{@merge_request.target_branch} | ||
34 | git fetch origin | 32 | git fetch origin |
33 | + git checkout -b #{@merge_request.source_branch} origin/#{@merge_request.source_branch} | ||
35 | %p | 34 | %p |
36 | %strong Step 2. | 35 | %strong Step 2. |
37 | - Merge source branch into target branch and push changes to GitLab | 36 | + Merge the branch and push the changes to GitLab |
38 | %pre.dark | 37 | %pre.dark |
39 | :preserve | 38 | :preserve |
40 | - git merge origin/#{@merge_request.source_branch} | 39 | + git checkout #{@merge_request.target_branch} |
40 | + git merge --no-ff #{@merge_request.source_branch} | ||
41 | git push origin #{@merge_request.target_branch} | 41 | git push origin #{@merge_request.target_branch} |
42 | 42 | ||
43 | 43 |