Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
G
gitlab-ce
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Kazuhiko Shiozaki
gitlab-ce
Commits
b2334da4
Commit
b2334da4
authored
Aug 08, 2015
by
Douwe Maan
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Improve text in MR "How To Merge" modal.
parent
b8590da0
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
30 additions
and
26 deletions
+30
-26
CHANGELOG
CHANGELOG
+1
-0
app/views/projects/merge_requests/show/_how_to_merge.html.haml
...iews/projects/merge_requests/show/_how_to_merge.html.haml
+29
-26
No files found.
CHANGELOG
View file @
b2334da4
...
...
@@ -44,6 +44,7 @@ v 7.14.0 (unreleased)
- Remove satellites
- Remove comments and email addresses when publicly exposing ssh keys (Zeger-Jan van de Weg)
- Improve MR merge widget text and UI consistency.
- Improve text in MR "How To Merge" modal.
v 7.13.3
- Fix bug causing Bitbucket importer to crash when OAuth application had been removed.
...
...
app/views/projects/merge_requests/show/_how_to_merge.html.haml
View file @
b2334da4
...
...
@@ -3,42 +3,45 @@
.modal-content
.modal-header
%a
.close
{
href:
"#"
,
"data-dismiss"
=>
"modal"
}
×
%h3
How to merge
%h3
Check out, review and merge locally
.modal-body
-
if
@merge_request
.
for_fork?
-
source_remote
=
@merge_request
.
source_project
.
namespace
.
nil?
?
"source"
:
@merge_request
.
source_project
.
namespace
.
path
-
target_remote
=
@merge_request
.
target_project
.
namespace
.
nil?
?
"target"
:
@merge_request
.
target_project
.
namespace
.
path
%p
%strong
Step 1.
Fetch the code and create a new branch pointing to it
%pre
.dark
%p
%strong
Step 1.
Fetch and check out the branch for this merge request
%pre
.dark
-
if
@merge_request
.
for_fork?
:preserve
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
%pre
.dark
:preserve
git checkout
#{
@merge_request
.
target_branch
}
git merge --no-ff
#{
@merge_request
.
source_project_path
}
-
#{
@merge_request
.
source_branch
}
git push origin
#{
@merge_request
.
target_branch
}
-
else
%p
%strong
Step 1.
Update the repo and checkout the branch we are going to merge
%pre
.dark
-
else
:preserve
git fetch origin
git checkout -b
#{
@merge_request
.
source_branch
}
origin/
#{
@merge_request
.
source_branch
}
%p
%strong
Step 2.
Merge the branch and push the changes to GitLab
%pre
.dark
%p
%strong
Step 2.
Review the changes locally
%p
%strong
Step 3.
Merge the branch and fix any conflicts that come up
%pre
.dark
-
if
@merge_request
.
for_fork?
:preserve
git checkout
#{
@merge_request
.
target_branch
}
git merge --no-ff
#{
@merge_request
.
source_project_path
}
-
#{
@merge_request
.
source_branch
}
-
else
:preserve
git checkout
#{
@merge_request
.
target_branch
}
git merge --no-ff
#{
@merge_request
.
source_branch
}
git push origin
#{
@merge_request
.
target_branch
}
%p
%strong
Step 4.
Push the result of the merge to GitLab
%pre
.dark
:preserve
git push origin
#{
@merge_request
.
target_branch
}
-
unless
@merge_request
.
can_be_merged_by?
(
current_user
)
%p
Note that pushing to GitLab requires write access to this repository.
:javascript
$
(
function
(){
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment