Debian Codegraph @

doc/html/hg-shelve.html

raw
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 shelve</title>
8 <link rel="stylesheet" href="../style.css" type="text/css" />
9 </head>
10 <body>
11 <div class="document" id="hg-shelve">
12 <span id="hg-shelve-1"></span>
13 <h1 class="title">hg shelve</h1>
14 <h2 class="subtitle" id="save-and-set-aside-changes-from-the-working-directory">save and set aside changes from the 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 shelve [OPTION]... [FILE]...
28 </pre>
29 </div>
30 <div class="section" id="description">
31 <h1><a class="toc-backref" href="#contents">Description</a></h1>
32 <p>Shelving takes files that &quot;hg status&quot; reports as not clean, saves
33 the modifications to a bundle (a shelved change), and reverts the
34 files so that their state in the working directory becomes clean.</p>
35 <p>To restore these changes to the working directory, using &quot;hg
36 unshelve&quot;; this will work even if you switch to a different
37 commit.</p>
38 <p>When no files are specified, &quot;hg shelve&quot; saves all not-clean
39 files. If specific files or directories are named, only changes to
40 those files are shelved.</p>
41 <p>In bare shelve (when no files are specified, without interactive,
42 include and exclude option), shelving remembers information if the
43 working directory was on newly created branch, in other words working
44 directory was on different branch than its first parent. In this
45 situation unshelving restores branch information to the working directory.</p>
46 <p>Each shelved change has a name that makes it easier to find later.
47 The name of a shelved change defaults to being based on the active
48 bookmark, or if there is no active bookmark, the current named
49 branch. To specify a different name, use <tt class="docutils literal"><span class="pre">--name</span></tt>.</p>
50 <p>To see a list of existing shelved changes, use the <tt class="docutils literal"><span class="pre">--list</span></tt>
51 option. For each shelved change, this will print its name, age,
52 and description; use <tt class="docutils literal"><span class="pre">--patch</span></tt> or <tt class="docutils literal"><span class="pre">--stat</span></tt> for more details.</p>
53 <p>To delete specific shelved changes, use <tt class="docutils literal"><span class="pre">--delete</span></tt>. To delete
54 all shelved changes, use <tt class="docutils literal"><span class="pre">--cleanup</span></tt>.</p>
55 </div>
56 <div class="section" id="options">
57 <h1><a class="toc-backref" href="#contents">Options</a></h1>
58 <table class="docutils option-list" frame="void" rules="none">
59 <col class="option" />
60 <col class="description" />
61 <tbody valign="top">
62 <tr><td class="option-group" colspan="2">
63 <kbd><span class="option">-A</span>, <span class="option">--addremove</span></kbd></td>
64 </tr>
65 <tr><td>&nbsp;</td><td>mark new/missing files as added/removed before shelving</td></tr>
66 <tr><td class="option-group">
67 <kbd><span class="option">-u</span>, <span class="option">--unknown</span></kbd></td>
68 <td>store unknown files in the shelve</td></tr>
69 <tr><td class="option-group">
70 <kbd><span class="option">--cleanup</span></kbd></td>
71 <td>delete all shelved changes</td></tr>
72 <tr><td class="option-group">
73 <kbd><span class="option">--date <var>&lt;DATE&gt;</var></span></kbd></td>
74 <td>shelve with the specified commit date</td></tr>
75 <tr><td class="option-group">
76 <kbd><span class="option">-d</span>, <span class="option">--delete</span></kbd></td>
77 <td>delete the named shelved change(s)</td></tr>
78 <tr><td class="option-group">
79 <kbd><span class="option">-e</span>, <span class="option">--edit</span></kbd></td>
80 <td>invoke editor on commit messages</td></tr>
81 <tr><td class="option-group">
82 <kbd><span class="option">-k</span>, <span class="option">--keep</span></kbd></td>
83 <td>shelve, but keep changes in the working directory</td></tr>
84 <tr><td class="option-group">
85 <kbd><span class="option">-l</span>, <span class="option">--list</span></kbd></td>
86 <td>list current shelves</td></tr>
87 <tr><td class="option-group" colspan="2">
88 <kbd><span class="option">-m</span>, <span class="option">--message <var>&lt;TEXT&gt;</var></span></kbd></td>
89 </tr>
90 <tr><td>&nbsp;</td><td>use text as shelve message</td></tr>
91 <tr><td class="option-group" colspan="2">
92 <kbd><span class="option">-n</span>, <span class="option">--name <var>&lt;NAME&gt;</var></span></kbd></td>
93 </tr>
94 <tr><td>&nbsp;</td><td>use the given name for the shelved commit</td></tr>
95 <tr><td class="option-group">
96 <kbd><span class="option">-p</span>, <span class="option">--patch</span></kbd></td>
97 <td>output patches for changes (provide the names of the shelved changes as positional arguments)</td></tr>
98 <tr><td class="option-group" colspan="2">
99 <kbd><span class="option">-i</span>, <span class="option">--interactive</span></kbd></td>
100 </tr>
101 <tr><td>&nbsp;</td><td>interactive mode</td></tr>
102 <tr><td class="option-group">
103 <kbd><span class="option">--stat</span></kbd></td>
104 <td>output diffstat-style summary of changes (provide the names of the shelved changes as positional arguments)</td></tr>
105 <tr><td class="option-group" colspan="2">
106 <kbd><span class="option">-I</span>, <span class="option">--include <var>&lt;PATTERN[+]&gt;</var></span></kbd></td>
107 </tr>
108 <tr><td>&nbsp;</td><td>include names matching the given patterns</td></tr>
109 <tr><td class="option-group" colspan="2">
110 <kbd><span class="option">-X</span>, <span class="option">--exclude <var>&lt;PATTERN[+]&gt;</var></span></kbd></td>
111 </tr>
112 <tr><td>&nbsp;</td><td>exclude names matching the given patterns</td></tr>
113 </tbody>
114 </table>
115 <p>[+] marked option can be specified multiple times</p>
116 </div>
117 </div>
118 </body>
119 </html>