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