OSDN Git Service

Add Git official document to help
[tortoisegit/TortoiseGitJp.git] / doc / source / en / TortoiseGit / git_doc / git-lost-found.html.xml
1 <?xml version="1.0" encoding="UTF-8"?>\r
2 <!DOCTYPE article PUBLIC "-//OASIS//DTD DocBook XML V4.2//EN" "http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd">\r
3 \r
4 <article lang="en" id="git-lost-found(1)">\r
5 <articleinfo>\r
6     <title>git-lost-found(1)</title>\r
7         <indexterm>\r
8                 <primary>git-lost-found(1)</primary>\r
9         </indexterm>\r
10 </articleinfo>\r
11 <simplesect id="_name">\r
12 <title>NAME</title>\r
13 <simpara>git-lost-found - Recover lost refs that luckily have not yet been pruned</simpara>\r
14 </simplesect>\r
15 <simplesect id="_synopsis">\r
16 <title>SYNOPSIS</title>\r
17 <simpara><emphasis>git lost-found</emphasis></simpara>\r
18 </simplesect>\r
19 <simplesect id="_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="_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="_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 <literallayout>$ git lost-found\r
39 [1ef2b196d909eed523d4f3c9bf54b78cdd6843c6] GIT 0.99.9c\r
40 ...</literallayout>\r
41 <simpara>Also you can use gitk to browse how any tags found relate to each\r
42 other.</simpara>\r
43 <literallayout>$ gitk $(cd .git/lost-found/commit &amp;&amp; echo ??*)</literallayout>\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 .git/refs hierarchy.</simpara>\r
46 <literallayout>$ git cat-file -t 1ef2b196\r
47 tag\r
48 $ git cat-file tag 1ef2b196\r
49 object fa41bbce8e38c67a218415de6cfa510c7e50032a\r
50 type commit\r
51 tag v0.99.9c\r
52 tagger Junio C Hamano &lt;junkio@cox.net&gt; 1131059594 -0800\r
53 \r
54 GIT 0.99.9c\r
55 \r
56 This contains the following changes from the "master" branch, since\r
57 ...\r
58 $ git update-ref refs/tags/not-lost-anymore 1ef2b196\r
59 $ git rev-parse not-lost-anymore\r
60 1ef2b196d909eed523d4f3c9bf54b78cdd6843c6</literallayout>\r
61 </simplesect>\r
62 <simplesect id="_author">\r
63 <title>Author</title>\r
64 <simpara>Written by Junio C Hamano &lt;<ulink url="mailto:gitster@pobox.com">gitster@pobox.com</ulink>&gt;</simpara>\r
65 </simplesect>\r
66 <simplesect id="_documentation">\r
67 <title>Documentation</title>\r
68 <simpara>Documentation by Junio C Hamano and the git-list &lt;<ulink url="mailto:git@vger.kernel.org">git@vger.kernel.org</ulink>&gt;.</simpara>\r
69 </simplesect>\r
70 <simplesect id="_git">\r
71 <title>GIT</title>\r
72 <simpara>Part of the <xref linkend="git(1)"/> suite</simpara>\r
73 </simplesect>\r
74 </article>\r