Commit 09eccf47 authored by dosire's avatar dosire

Instructions should create a merge commit and give people a chance to test the...

Instructions should create a merge commit and give people a chance to test the branch we are going to merge.
parent 03770698
......@@ -10,34 +10,38 @@
- target_remote = @merge_request.target_project.namespace.nil? ? "target" :@merge_request.target_project.namespace.path
%p
%strong Step 1.
Checkout target branch and get recent objects from GitLab
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}
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 checkout #{target_remote} #{@merge_request.target_branch}
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 source branch into target branch and push changes to GitLab
Merge the source branch into target branch and push changes to GitLab
%pre.dark
:preserve
git merge #{source_remote}/#{@merge_request.source_branch}
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.
Checkout target branch and get recent objects from GitLab
Update the repo and checkout the branch we are going to merge
%pre.dark
:preserve
git checkout #{@merge_request.target_branch}
git fetch origin
git checkout -b #{@merge_request.source_branch}
%p
%strong Step 2.
Merge source branch into target branch and push changes to GitLab
Merge the source branch into target branch and push changes to GitLab
%pre.dark
:preserve
git merge origin/#{@merge_request.source_branch}
git checkout #{@merge_request.target_branch}
git merge --no-ff #{@merge_request.source_branch}
git push origin #{@merge_request.target_branch}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment