| 1 |
<?xml version="1.0" encoding="utf-8"?> |
| 2 |
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> |
| 3 |
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en"> |
| 4 |
<head> |
| 5 |
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> |
| 6 |
<meta name="generator" content="Docutils 0.21.2: https://docutils.sourceforge.io/" /> |
| 7 |
<title>hg merge</title> |
| 8 |
<link rel="stylesheet" href="../style.css" type="text/css" /> |
| 9 |
</head> |
| 10 |
<body> |
| 11 |
<div class="document" id="hg-merge"> |
| 12 |
<span id="hg-merge-1"></span> |
| 13 |
<h1 class="title">hg merge</h1> |
| 14 |
<h2 class="subtitle" id="merge-another-revision-into-working-directory">merge another revision into working directory</h2> |
| 15 |
|
| 16 |
<div class="contents htmlonly topic" id="contents"> |
| 17 |
<p class="topic-title"><a class="reference internal" href="#top">Contents</a></p> |
| 18 |
<ul class="simple"> |
| 19 |
<li><a class="reference internal" href="#synopsis" id="toc-entry-1">Synopsis</a></li> |
| 20 |
<li><a class="reference internal" href="#description" id="toc-entry-2">Description</a></li> |
| 21 |
<li><a class="reference internal" href="#options" id="toc-entry-3">Options</a></li> |
| 22 |
</ul> |
| 23 |
</div> |
| 24 |
<div class="section" id="synopsis"> |
| 25 |
<h1><a class="toc-backref" href="#contents">Synopsis</a></h1> |
| 26 |
<pre class="literal-block"> |
| 27 |
hg merge [-P] [[-r] REV] |
| 28 |
</pre> |
| 29 |
</div> |
| 30 |
<div class="section" id="description"> |
| 31 |
<h1><a class="toc-backref" href="#contents">Description</a></h1> |
| 32 |
<p>The current working directory is updated with all changes made in |
| 33 |
the requested revision since the last common predecessor revision.</p> |
| 34 |
<p>Files that changed between either parent are marked as changed for |
| 35 |
the next commit and a commit must be performed before any further |
| 36 |
updates to the repository are allowed. The next commit will have |
| 37 |
two parents.</p> |
| 38 |
<p><tt class="docutils literal"><span class="pre">--tool</span></tt> can be used to specify the merge tool used for file |
| 39 |
merges. It overrides the HGMERGE environment variable and your |
| 40 |
configuration files. See <a class="reference external" href="topic-merge-tools.html"><tt class="docutils literal">hg help <span class="pre">merge-tools</span></tt></a> for options.</p> |
| 41 |
<p>If no revision is specified, the working directory's parent is a |
| 42 |
head revision, and the current branch contains exactly one other |
| 43 |
head, the other head is merged with by default. Otherwise, an |
| 44 |
explicit revision with which to merge must be provided.</p> |
| 45 |
<p>See <a class="reference external" href="hg-resolve.html"><tt class="docutils literal">hg help resolve</tt></a> for information on handling file conflicts.</p> |
| 46 |
<p>To undo an uncommitted merge, use <a class="reference external" href="hg-merge.html"><tt class="docutils literal">hg merge <span class="pre">--abort</span></tt></a> which |
| 47 |
will check out a clean copy of the original merge parent, losing |
| 48 |
all changes.</p> |
| 49 |
<p>Returns 0 on success, 1 if there are unresolved files.</p> |
| 50 |
</div> |
| 51 |
<div class="section" id="options"> |
| 52 |
<h1><a class="toc-backref" href="#contents">Options</a></h1> |
| 53 |
<table class="docutils option-list" frame="void" rules="none"> |
| 54 |
<col class="option" /> |
| 55 |
<col class="description" /> |
| 56 |
<tbody valign="top"> |
| 57 |
<tr><td class="option-group"> |
| 58 |
<kbd><span class="option">-f</span>, <span class="option">--force</span></kbd></td> |
| 59 |
<td>force a merge including outstanding changes (DEPRECATED)</td></tr> |
| 60 |
<tr><td class="option-group" colspan="2"> |
| 61 |
<kbd><span class="option">-r</span>, <span class="option">--rev <var><REV></var></span></kbd></td> |
| 62 |
</tr> |
| 63 |
<tr><td> </td><td>revision to merge</td></tr> |
| 64 |
<tr><td class="option-group"> |
| 65 |
<kbd><span class="option">-P</span>, <span class="option">--preview</span></kbd></td> |
| 66 |
<td>review revisions to merge (no merge is performed)</td></tr> |
| 67 |
<tr><td class="option-group"> |
| 68 |
<kbd><span class="option">--abort</span></kbd></td> |
| 69 |
<td>abort the ongoing merge</td></tr> |
| 70 |
<tr><td class="option-group" colspan="2"> |
| 71 |
<kbd><span class="option">-t</span>, <span class="option">--tool <var><TOOL></var></span></kbd></td> |
| 72 |
</tr> |
| 73 |
<tr><td> </td><td>specify merge tool</td></tr> |
| 74 |
</tbody> |
| 75 |
</table> |
| 76 |
</div> |
| 77 |
</div> |
| 78 |
</body> |
| 79 |
</html> |