You are not logged in.
Long story short:
$ git add foo
$ git rm -r --cache foo/barNoticing that my .git folder was still rather large (foo/bar contained 90%) I ran
$ git clean -fdthinking that would clean the .git folder. Apparently I was mistaken and 'clean' is actually a synonym for 'destroy_my_data', because my .git folder is still bloated but my data is gone.
I guess all the files in '.' that were never tracked are gone for good, but is there some way to restore foo/bar from the bloated .git folder?
Last edited by alphaniner (2014-09-29 13:04:58)
But whether the Constitution really be one thing, or another, this much is certain - that it has either authorized such a government as we have had, or has been powerless to prevent it. In either case, it is unfit to exist.
-Lysander Spooner
Offline
Try this:
$ git fsck --lost-foundThis will hopefully mention a dangling blob.
Then see what is in your .git/lost-found/other/
It may have hashes for filenames but worth a try.
Offline
Thanks, that's good to know. As it turns out though, I had actually backed up foo/bar, because that 'rm' command worried me. So I got that back easily.
But 'clean' sounds so innocuous that I didn't backup the untracked folders, all of which were updated quite a bit since the last full backup... :'(
But whether the Constitution really be one thing, or another, this much is certain - that it has either authorized such a government as we have had, or has been powerless to prevent it. In either case, it is unfit to exist.
-Lysander Spooner
Offline
That you didn't even bother to read the man page or the git tutorial eg git-scm.com, is beyond me.
RiP, Jeff http://www.slayer.net/at/jeff-hanneman
Offline
That you felt the need to share that is beyond me.
But whether the Constitution really be one thing, or another, this much is certain - that it has either authorized such a government as we have had, or has been powerless to prevent it. In either case, it is unfit to exist.
-Lysander Spooner
Offline
But 'clean' sounds so innocuous that I didn't backup the untracked folders, all of which were updated quite a bit since the last full backup... :'(
I always have extundelete installed as one more step in my backup net. When I notice I removed a file that is not in the backup yet, I unmount my partition or remount it readonly, then I try to recover the file(s). Since you have moved a lot of data since the removal, it might not help you anymore.
Last edited by progandy (2014-09-29 13:52:21)
| alias CUTF='LANG=en_XX.UTF-8@POSIX ' | alias ENGLISH='LANG=C.UTF-8 ' |
Offline