updated git doc
[TortoiseGit.git] / doc / source / en / TortoiseGit / git_doc / git-prune.xml
blobfe309b3d589b1badced5792b1618849e824ce8cf
1 <?xml version="1.0" encoding="UTF-8"?>\r
2 <!DOCTYPE article PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN" "http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd">\r
3 \r
4 <article lang="en" id="git-prune(1)">\r
5 <articleinfo>\r
6     <title>git-prune(1)</title>\r
7 <indexterm>\r
8 <primary>git-prune(1)</primary>\r
9 </indexterm>\r
10 </articleinfo>\r
11 <simplesect id="_name">\r
12 <title>NAME</title>\r
13 <simpara>git-prune - Prune all unreachable objects from the object database</simpara>\r
14 </simplesect>\r
15 <simplesect id="_synopsis">\r
16 <title>SYNOPSIS</title>\r
17 <blockquote>\r
18 <literallayout><emphasis>git prune</emphasis> [-n] [-v] [--expire &lt;expire&gt;] [--] [&lt;head&gt;&#8230;]</literallayout>\r
19 </blockquote>\r
20 </simplesect>\r
21 <simplesect id="_description">\r
22 <title>DESCRIPTION</title>\r
23 <note><simpara>In most cases, users should run <emphasis>git gc</emphasis>, which calls\r
24 <emphasis>git prune</emphasis>. See the section "NOTES", below.</simpara></note>\r
25 <simpara>This runs <emphasis>git fsck --unreachable</emphasis> using all the refs\r
26 available in <emphasis>refs/</emphasis>, optionally with additional set of\r
27 objects specified on the command line, and prunes all unpacked\r
28 objects unreachable from any of these head objects from the object database.\r
29 In addition, it\r
30 prunes the unpacked objects that are also found in packs by\r
31 running <emphasis>git prune-packed</emphasis>.</simpara>\r
32 <simpara>Note that unreachable, packed objects will remain.  If this is\r
33 not desired, see <xref linkend="git-repack(1)" />.</simpara>\r
34 </simplesect>\r
35 <simplesect id="_options">\r
36 <title>OPTIONS</title>\r
37 <variablelist>\r
38 <varlistentry>\r
39 <term>\r
40 -n\r
41 </term>\r
42 <term>\r
43 --dry-run\r
44 </term>\r
45 <listitem>\r
46 <simpara>\r
47         Do not remove anything; just report what it would\r
48         remove.\r
49 </simpara>\r
50 </listitem>\r
51 </varlistentry>\r
52 <varlistentry>\r
53 <term>\r
54 -v\r
55 </term>\r
56 <term>\r
57 --verbose\r
58 </term>\r
59 <listitem>\r
60 <simpara>\r
61         Report all removed objects.\r
62 </simpara>\r
63 </listitem>\r
64 </varlistentry>\r
65 <varlistentry>\r
66 <term>\r
67 --\r
68 </term>\r
69 <listitem>\r
70 <simpara>\r
71         Do not interpret any more arguments as options.\r
72 </simpara>\r
73 </listitem>\r
74 </varlistentry>\r
75 <varlistentry>\r
76 <term>\r
77 --expire &lt;time&gt;\r
78 </term>\r
79 <listitem>\r
80 <simpara>\r
81         Only expire loose objects older than &lt;time&gt;.\r
82 </simpara>\r
83 </listitem>\r
84 </varlistentry>\r
85 <varlistentry>\r
86 <term>\r
87 &lt;head&gt;&#8230;\r
88 </term>\r
89 <listitem>\r
90 <simpara>\r
91         In addition to objects\r
92         reachable from any of our references, keep objects\r
93         reachable from listed &lt;head&gt;s.\r
94 </simpara>\r
95 </listitem>\r
96 </varlistentry>\r
97 </variablelist>\r
98 </simplesect>\r
99 <simplesect id="_example">\r
100 <title>EXAMPLE</title>\r
101 <simpara>To prune objects not used by your repository nor another that\r
102 borrows from your repository via its\r
103 <emphasis>.git/objects/info/alternates</emphasis>:</simpara>\r
104 <screen>$ git prune $(cd ../another &amp;&amp; $(git rev-parse --all))</screen>\r
105 </simplesect>\r
106 <simplesect id="_notes">\r
107 <title>Notes</title>\r
108 <simpara>In most cases, users will not need to call <emphasis>git prune</emphasis> directly, but\r
109 should instead call <emphasis>git gc</emphasis>, which handles pruning along with\r
110 many other housekeeping tasks.</simpara>\r
111 <simpara>For a description of which objects are considered for pruning, see\r
112 <emphasis>git fsck</emphasis>'s --unreachable option.</simpara>\r
113 </simplesect>\r
114 <simplesect id="_see_also">\r
115 <title>SEE ALSO</title>\r
116 <simpara><xref linkend="git-fsck(1)" />,\r
117 <xref linkend="git-gc(1)" />,\r
118 <xref linkend="git-reflog(1)" /></simpara>\r
119 </simplesect>\r
120 <simplesect id="_git">\r
121 <title>GIT</title>\r
122 <simpara>Part of the <xref linkend="git(1)" /> suite</simpara>\r
123 </simplesect>\r
124 </article>\r