1 <?xml version='
1.0' encoding='utf-
8'
?><!DOCTYPE html PUBLIC
"-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
2 <html xmlns=
"http://www.w3.org/1999/xhtml">
4 <meta http-equiv=
"Content-Type" content=
"text/html; charset=utf-8"/>
5 <title>EGit User Guide - Merging
</title>
6 <link type=
"text/css" rel=
"stylesheet" href=
"../../book.css"/>
9 <table class=
"navigation" style=
"width: 100%;" border=
"0" summary=
"navigation">
11 <th style=
"width: 100%" align=
"center" colspan=
"3">Merging
</th>
14 <td style=
"width: 20%" align=
"left">
15 <a href=
"Branching.html" title=
"Branching">
16 <img alt=
"Previous" border=
"0" src=
"../../images/prev.gif"/>
19 <td style=
"width: 60%" align=
"center"></td>
20 <td style=
"width: 20%" align=
"right">
21 <a href=
"Tagging.html" title=
"Tagging">
22 <img alt=
"Next" border=
"0" src=
"../../images/next.gif"/>
27 <td style=
"width: 20%" align=
"left" valign=
"top">Branching
</td>
28 <td style=
"width: 60%" align=
"center"></td>
29 <td style=
"width: 20%" align=
"right" valign=
"top">Tagging
</td>
32 <h1 id=
"Merging">Merging
</h1>
33 <p>A merge incorporates changes from named commits (since the time their histories diverged from the current branch) into the current branch.
</p>
34 <h2 id=
"Merging_a_branch_or_a_tag_into_the_current_branch">Merging a branch or a tag into the current branch
</h2>
35 <p>Note: Egit currently supports only fast-forward merges (see below).
</p>
36 <p>In the Package Explorer or Navigator, open the context menu on a project node.
38 <b>Team
> Merge...
</b>
40 <p>Now the merge dialog opens:
</p>
42 <img border=
"0" src=
"images/MergeDialog.png"/>
44 <p>On the dialog, select a branch or a tag you want to merge with your current branch. After pressing the Merge button,
45 the following scenarios can occur:
</p>
47 <li>Already up to date: Your current branch points to a commit that has the selected branch or tag as predecessor. In this case nothing is changed.
</li>
48 <li>Fast-forward: Your current branch points to a commit that is a predecessor of the selected branch or tag. In this case your branch is moved and points to the selected branch or tag; this new HEAD is checked out to the working tree. Fast-forward is very common when working with remote repositories: When a remote tracking branch is updated, the merge with the corresponding branch generally is a fast-forward. You can perform a pull by fetching the remote branch (e.g. origin/master) and merging it into the corresponding local branch (e.g. master).
</li>
49 <li>Real merge: When neither of the conditions above apply egit triggers a merge of the commits. This is not implemented yet.
</li>
51 <table class=
"navigation" style=
"width: 100%;" border=
"0" summary=
"navigation">
53 <td style=
"width: 20%" align=
"left">
54 <a href=
"Branching.html" title=
"Branching">
55 <img alt=
"Previous" border=
"0" src=
"../../images/prev.gif"/>
58 <td style=
"width: 60%" align=
"center">
59 <a href=
"User-Guide.html" title=
"EGit User Guide">
60 <img alt=
"EGit User Guide" border=
"0" src=
"../../images/home.gif"/>
63 <td style=
"width: 20%" align=
"right">
64 <a href=
"Tagging.html" title=
"Tagging">
65 <img alt=
"Next" border=
"0" src=
"../../images/next.gif"/>
70 <td style=
"width: 20%" align=
"left" valign=
"top">Branching
</td>
71 <td style=
"width: 60%" align=
"center"></td>
72 <td style=
"width: 20%" align=
"right" valign=
"top">Tagging
</td>