Linux and UNIX Man Pages

Linux & Unix Commands - Search Man Pages

git-lost-found(1) [linux man page]

GIT-LOST-FOUND(1)						    Git Manual							 GIT-LOST-FOUND(1)

NAME
git-lost-found - Recover lost refs that luckily have not yet been pruned SYNOPSIS
git lost-found DESCRIPTION
NOTE: this command is deprecated. Use git-fsck(1) with the option --lost-found instead. Finds dangling commits and tags from the object database, and creates refs to them in the .git/lost-found/ directory. Commits and tags that dereference to commits are stored in .git/lost-found/commit, and other objects are stored in .git/lost-found/other. OUTPUT
Prints to standard output the object names and one-line descriptions of any commits or tags found. EXAMPLE
Suppose you run git tag -f and mistype the tag to overwrite. The ref to your tag is overwritten, but until you run git prune, the tag itself is still there. $ git lost-found [1ef2b196d909eed523d4f3c9bf54b78cdd6843c6] GIT 0.99.9c ... Also you can use gitk to browse how any tags found relate to each other. $ gitk $(cd .git/lost-found/commit && echo ??*) After making sure you know which the object is the tag you are looking for, you can reconnect it to your regular refs hierarchy by using the update-ref command. $ git cat-file -t 1ef2b196 tag $ git cat-file tag 1ef2b196 object fa41bbce8e38c67a218415de6cfa510c7e50032a type commit tag v0.99.9c tagger Junio C Hamano <junkio@cox.net> 1131059594 -0800 GIT 0.99.9c This contains the following changes from the "master" branch, since ... $ git update-ref refs/tags/not-lost-anymore 1ef2b196 $ git rev-parse not-lost-anymore 1ef2b196d909eed523d4f3c9bf54b78cdd6843c6 GIT
Part of the git(1) suite Git 1.8.5.3 01/14/2014 GIT-LOST-FOUND(1)

Check Out this Related Man Page

GIT-LOST-FOUND(1)						    Git Manual							 GIT-LOST-FOUND(1)

NAME
git-lost-found - Recover lost refs that luckily have not yet been pruned SYNOPSIS
git lost-found DESCRIPTION
NOTE: this command is deprecated. Use git-fsck(1) with the option --lost-found instead. Finds dangling commits and tags from the object database, and creates refs to them in the .git/lost-found/ directory. Commits and tags that dereference to commits are stored in .git/lost-found/commit, and other objects are stored in .git/lost-found/other. OUTPUT
Prints to standard output the object names and one-line descriptions of any commits or tags found. EXAMPLE
Suppose you run git tag -f and mistype the tag to overwrite. The ref to your tag is overwritten, but until you run git prune, the tag itself is still there. $ git lost-found [1ef2b196d909eed523d4f3c9bf54b78cdd6843c6] GIT 0.99.9c ... Also you can use gitk to browse how any tags found relate to each other. $ gitk $(cd .git/lost-found/commit && echo ??*) After making sure you know which the object is the tag you are looking for, you can reconnect it to your regular refs hierarchy by using the update-ref command. $ git cat-file -t 1ef2b196 tag $ git cat-file tag 1ef2b196 object fa41bbce8e38c67a218415de6cfa510c7e50032a type commit tag v0.99.9c tagger Junio C Hamano <junkio@cox.net> 1131059594 -0800 GIT 0.99.9c This contains the following changes from the "master" branch, since ... $ git update-ref refs/tags/not-lost-anymore 1ef2b196 $ git rev-parse not-lost-anymore 1ef2b196d909eed523d4f3c9bf54b78cdd6843c6 GIT
Part of the git(1) suite Git 1.8.3.1 06/10/2014 GIT-LOST-FOUND(1)
Man Page

14 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

recover lost data

I did a rm -r command on a directory. I would like to know if there is any way I can recover the data that was lost during this operation. (2 Replies)
Discussion started by: pkappaz
2 Replies

2. UNIX for Dummies Questions & Answers

Lost+found

Hi all, after a crash of our SUN Server 220R on file system was corrupt and I had run fsck getting a lost of files/dir's in the lost+found of the file system loking like drwxrwxr-x 2 lmxadmin DOS---- 512 Oct 31 21:04 #0007680 drwxrwxr-x 2 lammer DOS---- 512 Jan 29 09:29... (6 Replies)
Discussion started by: DPAI
6 Replies

3. UNIX for Advanced & Expert Users

lost data

Hi, Instead of using the tar xvf ...I used tar cvf <device file> for a DLT and the whole of the 50GB data was lost in less than 10sec....The data was not over written for sure. but when i use a tar tvf there is nothing inside. Can i get back the data by any means. If not y. (2 Replies)
Discussion started by: i2admin
2 Replies

4. UNIX for Dummies Questions & Answers

lost+found directory

what is the directory "lost+found" and how is it used? (2 Replies)
Discussion started by: Ben070371
2 Replies

5. UNIX for Advanced & Expert Users

lost+found

Does anyone have or know of a script to help sort and display a large lost+found directory? i've googled this but not much help solaris 9 thanks (3 Replies)
Discussion started by: morrish
3 Replies

6. UNIX for Dummies Questions & Answers

Grep ruins color

When I run: git branch -a I git a nice green and red colored output, but if I pipe the above command through grep: git branch -a | grep -v "master" I lose my colored output. Is there a way around this? (2 Replies)
Discussion started by: blasto333
2 Replies

7. UNIX for Dummies Questions & Answers

^M: not found

Hi All, when i ran a shell script ,its showing "^M: not found" errore i used the the code dos2unix sunshine.sh sunshine1.sh and then again i ran the scriptand then its still showing the errore please help me in the matter. thanks... (3 Replies)
Discussion started by: manit
3 Replies

8. SuSE

Recover dropped database

I have deleted a database. I restored it again with a backup. Now we lost some data of two days. Is it possible to restore this lost data? (5 Replies)
Discussion started by: Eastme
5 Replies

9. Shell Programming and Scripting

Shell scripting

The given file consists of two tags i.e., <free-energy> and <position> tag. I want the output like this. The tag <length> is not required to consider. (General format of output) free-energy no. first position no - second position no third position no - fourth position no ------ ------... (2 Replies)
Discussion started by: hravisankar
2 Replies

10. Emergency UNIX and Linux Support

Shell scripting

The given file consists of two tags i.e., <free-energy> and <position> tag. I want the output like this. The tag <length> is not required to consider. (General format of output) free-energy no. first position no – second position no third position no – fourth position no ------ ... (8 Replies)
Discussion started by: hravisankar
8 Replies

11. Red Hat

lost+found

Hi, What is lost+found in linux ? Cheers, snj (2 Replies)
Discussion started by: snjksh
2 Replies

12. AIX

GIT issue in AIX 6.1

Hello, I recently installed GIT 1.8.1 on my AIX 6.1 machine referring to AIX Open Source Packages | Main / git website and am facing a few issues with it. Now if I login as root and issue git commands like git --version I get the response as shown : git version 1.8.1And I have tried creating... (4 Replies)
Discussion started by: gaugeta
4 Replies

13. UNIX for Dummies Questions & Answers

Power failure: file damage?

~#hello -all, Many UNIX/Linux/BSD/etc books warn about turn off the puter without a proper shutdown. This can damage files which are open at that moment. Seems logical to me. My question is.. does the system warn you when there are damaged files when the system is up again? I had a power failure... (7 Replies)
Discussion started by: raylier
7 Replies

14. UNIX for Beginners Questions & Answers

Git or PKGutil

i am running solaris 10 and they want GIt on there. The instructions that I found on line want me to use pkgutil which i don't have either. Most packages that i have installed come from the cd and are labeled SUNW... I see one instruction to add pkgadd -d http://get.opencsw.org/now ... (4 Replies)
Discussion started by: goya
4 Replies