Merge branch 'stable-0.8'
[egit.git] / org.eclipse.egit.doc / help / EGit / User_Guide / Merging.html
blob1531003880ce3fe71f2b2167205f69f2a20b905e
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">
3 <head>
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"/>
7 </head>
8 <body>
9 <table class="navigation" style="width: 100%;" border="0" summary="navigation">
10 <tr>
11 <th style="width: 100%" align="center" colspan="3">Merging</th>
12 </tr>
13 <tr>
14 <td style="width: 20%" align="left">
15 <a href="Branching.html" title="Branching">
16 <img alt="Previous" border="0" src="../../images/prev.gif"/>
17 </a>
18 </td>
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"/>
23 </a>
24 </td>
25 </tr>
26 <tr>
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>
30 </tr>
31 </table><hr/>
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.
37 Select
38 <b>Team &gt; Merge...</b>
39 </p>
40 <p>Now the merge dialog opens:</p>
41 <p>
42 <img border="0" src="images/MergeDialog.png"/>
43 </p>
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>
46 <ul>
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>
50 </ul><hr/>
51 <table class="navigation" style="width: 100%;" border="0" summary="navigation">
52 <tr>
53 <td style="width: 20%" align="left">
54 <a href="Branching.html" title="Branching">
55 <img alt="Previous" border="0" src="../../images/prev.gif"/>
56 </a>
57 </td>
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"/>
61 </a>
62 </td>
63 <td style="width: 20%" align="right">
64 <a href="Tagging.html" title="Tagging">
65 <img alt="Next" border="0" src="../../images/next.gif"/>
66 </a>
67 </td>
68 </tr>
69 <tr>
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>
73 </tr>
74 </table>
75 </body>
76 </html>