diff options
author | Johann MacDonagh <johann.macdonagh@gmail.com> | 2014-02-08 21:47:20 -0500 |
---|---|---|
committer | Johann MacDonagh <johann.macdonagh@gmail.com> | 2014-02-08 22:15:44 -0500 |
commit | 88d397f473a40236c7a03a7acf924a3640e70d9c (patch) | |
tree | 75f542bfc6be8eae6500c791571f8b757b38fddd | |
parent | 54b892153440935a08e00c63db3ec8a607ae3565 (diff) | |
download | gitlab-ce-88d397f473a40236c7a03a7acf924a3640e70d9c.tar.gz |
Instruct users to fetch merge request branch
Instructing users to create a new branch on the target branch and then
pulling creates a few issues. If the target branch has moved on since
the source branch diverged from it, then the pull will create an
unnecessary merge commit from the target branch to the source branch. If
the user has pull.rebase set to "true" or "preserve", then this creates
an even stranger history. These instructions will ensure the local
branch created for the merge request is exactly what contributing user
has pushed.
-rw-r--r-- | app/views/projects/merge_requests/show/_how_to_merge.html.haml | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/app/views/projects/merge_requests/show/_how_to_merge.html.haml b/app/views/projects/merge_requests/show/_how_to_merge.html.haml index 9540453ce3e..63db4b30968 100644 --- a/app/views/projects/merge_requests/show/_how_to_merge.html.haml +++ b/app/views/projects/merge_requests/show/_how_to_merge.html.haml @@ -10,11 +10,11 @@ - 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 + Fetch the code and create a new branch pointing to it %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} + git fetch #{@merge_request.source_project.http_url_to_repo} #{@merge_request.source_branch} + git checkout -b #{@merge_request.source_project_path}-#{@merge_request.source_branch} FETCH_HEAD %p %strong Step 2. Merge the branch and push the changes to GitLab |