1GIT-LOST-FOUND(1)                 Git Manual                 GIT-LOST-FOUND(1)
2
3
4

NAME

6       git-lost-found - Recover lost refs that luckily have not yet been
7       pruned
8

SYNOPSIS

10       git lost-found
11
12

DESCRIPTION

14       NOTE: this command is deprecated. Use git-fsck(1) with the option
15       --lost-found instead.
16
17       Finds dangling commits and tags from the object database, and creates
18       refs to them in the .git/lost-found/ directory. Commits and tags that
19       dereference to commits are stored in .git/lost-found/commit, and other
20       objects are stored in .git/lost-found/other.
21

OUTPUT

23       Prints to standard output the object names and one-line descriptions of
24       any commits or tags found.
25

EXAMPLE

27       Suppose you run git tag -f and mistype the tag to overwrite. The ref to
28       your tag is overwritten, but until you run git prune, the tag itself is
29       still there.
30
31           $ git lost-found
32           [1ef2b196d909eed523d4f3c9bf54b78cdd6843c6] GIT 0.99.9c
33           ...
34
35
36       Also you can use gitk to browse how any tags found relate to each
37       other.
38
39           $ gitk $(cd .git/lost-found/commit && echo ??*)
40
41
42       After making sure you know which the object is the tag you are looking
43       for, you can reconnect it to your regular refs hierarchy by using the
44       update-ref command.
45
46           $ git cat-file -t 1ef2b196
47           tag
48           $ git cat-file tag 1ef2b196
49           object fa41bbce8e38c67a218415de6cfa510c7e50032a
50           type commit
51           tag v0.99.9c
52           tagger Junio C Hamano <junkio@cox.net> 1131059594 -0800
53
54           GIT 0.99.9c
55
56           This contains the following changes from the "master" branch, since
57           ...
58           $ git update-ref refs/tags/not-lost-anymore 1ef2b196
59           $ git rev-parse not-lost-anymore
60           1ef2b196d909eed523d4f3c9bf54b78cdd6843c6
61
62

GIT

64       Part of the git(1) suite
65
66
67
68Git 1.8.3.1                       11/19/2018                 GIT-LOST-FOUND(1)
Impressum