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 | 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 | + Checkout the branch we are going to merge and pull in the code | |
16 | 14 | %pre.dark |
17 | 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 | 18 | %p |
21 | 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 | 21 | %pre.dark |
24 | 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 | 26 | - else |
28 | 27 | %p |
29 | 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 | 30 | %pre.dark |
32 | 31 | :preserve |
33 | - git checkout #{@merge_request.target_branch} | |
34 | 32 | git fetch origin |
33 | + git checkout -b #{@merge_request.source_branch} origin/#{@merge_request.source_branch} | |
35 | 34 | %p |
36 | 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 | 37 | %pre.dark |
39 | 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 | 41 | git push origin #{@merge_request.target_branch} |
42 | 42 | |
43 | 43 | ... | ... |