This forum has been archived. All content is frozen. Please use KDE Discuss instead.

recover files from "git remove" using: git fsck; git show

Tags: git, git-dolphin, git-integration git, git-dolphin, git-integration git, git-dolphin, git-integration
(comma "," separated)
User avatar
zachus
Registered Member
Posts
56
Karma
0
OS
git remove in Dolphin (after right click) will kill the file, it is gone after you click.
Image

but you can recover the file, here is the full sequence: o)
Code: Select all
1. mkdir bb ; cd bb ; git init
2. touch aaa
3. git add aaa
4. in Dolphin, right click and click "git remove" while file "aaa" is marked
5.   # now the file aaa seems destroyed ! 
6.  git fsck --name-objects
7.  git show 6809d……  >  recovered_dangling_blob


since you won't have any luck looking in the trashbin for the nuked file. >:D




Bookmarks



Who is online

Registered users: Bing [Bot], gfielding, Google [Bot], markhm, sethaaaa, Sogou [Bot], Yahoo [Bot]