Merge branch 'scintilla-365'
[TortoiseGit.git] / doc / source / en / TortoiseGit / git_doc / git-lost-found.xml
bloba08cf4da36961023c1ab1cacc5e1adfeeedb3e25
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-lost-found(1)">\r
5     <title>git-lost-found(1)</title>\r
6 <indexterm>\r
7 <primary>git-lost-found(1)</primary>\r
8 </indexterm>\r
9 <simplesect id="git-lost-found(1)__name">\r
10 <title>NAME</title>\r
11 <simpara>git-lost-found - Recover lost refs that luckily have not yet been pruned</simpara>\r
12 </simplesect>\r
13 <simplesect id="git-lost-found(1)__synopsis">\r
14 <title>SYNOPSIS</title>\r
15 <blockquote>\r
16 <literallayout><emphasis>git lost-found</emphasis></literallayout>\r
17 </blockquote>\r
18 </simplesect>\r
19 <simplesect id="git-lost-found(1)__description">\r
20 <title>DESCRIPTION</title>\r
21 <simpara><emphasis role="strong">NOTE</emphasis>: this command is deprecated.  Use <xref linkend="git-fsck(1)" /> with\r
22 the option <emphasis>--lost-found</emphasis> instead.</simpara>\r
23 <simpara>Finds dangling commits and tags from the object database, and\r
24 creates refs to them in the .git/lost-found/ directory.  Commits and\r
25 tags that dereference to commits are stored in .git/lost-found/commit,\r
26 and other objects are stored in .git/lost-found/other.</simpara>\r
27 </simplesect>\r
28 <simplesect id="git-lost-found(1)__output">\r
29 <title>OUTPUT</title>\r
30 <simpara>Prints to standard output the object names and one-line descriptions\r
31 of any commits or tags found.</simpara>\r
32 </simplesect>\r
33 <simplesect id="git-lost-found(1)__example">\r
34 <title>EXAMPLE</title>\r
35 <simpara>Suppose you run <emphasis>git tag -f</emphasis> and mistype the tag to overwrite.\r
36 The ref to your tag is overwritten, but until you run <emphasis>git\r
37 prune</emphasis>, the tag itself is still there.</simpara>\r
38 <screen>$ git lost-found\r
39 [1ef2b196d909eed523d4f3c9bf54b78cdd6843c6] GIT 0.99.9c\r
40 ...</screen>\r
41 <simpara>Also you can use gitk to browse how any tags found relate to each\r
42 other.</simpara>\r
43 <screen>$ gitk $(cd .git/lost-found/commit &amp;&amp; echo ??*)</screen>\r
44 <simpara>After making sure you know which the object is the tag you are looking\r
45 for, you can reconnect it to your regular <emphasis>refs</emphasis> hierarchy by using\r
46 the <emphasis>update-ref</emphasis> command.</simpara>\r
47 <screen>$ git cat-file -t 1ef2b196\r
48 tag\r
49 $ git cat-file tag 1ef2b196\r
50 object fa41bbce8e38c67a218415de6cfa510c7e50032a\r
51 type commit\r
52 tag v0.99.9c\r
53 tagger Junio C Hamano &lt;junkio@cox.net&gt; 1131059594 -0800\r
55 GIT 0.99.9c\r
57 This contains the following changes from the "master" branch, since\r
58 ...\r
59 $ git update-ref refs/tags/not-lost-anymore 1ef2b196\r
60 $ git rev-parse not-lost-anymore\r
61 1ef2b196d909eed523d4f3c9bf54b78cdd6843c6</screen>\r
62 </simplesect>\r
63 <simplesect id="git-lost-found(1)__git">\r
64 <title>GIT</title>\r
65 <simpara>Part of the <xref linkend="git(1)" /> suite</simpara>\r
66 </simplesect>\r
67 </sect2>\r