repository - Unable to access local Git repo after quitting during a rebase -


my virtual machine shutdown during git rebase , project directory has no sight of git repository @ all. when git status following:

vagrant@localhost /var/www/crmpicco $ git status fatal: not git repository (or of parent directories): .git 

i tried re-initialising repo, had no effect:

vagrant@localhost /var/www/crmpicco $ git init reinitialized existing git repository in /var/www/releases/20141013104615/.git/ vagrant@localhost /var/www/crmpicco $ git status fatal: not git repository (or of parent directories): .git 

inside .git directory have following:

vagrant@localhost /var/www/crmpicco/.git $ ls -all total 92 drwxr-xr-x+   9 vagrant vagrant 4096 jul  8 09:26 . drwxr-xr-x+  18 vagrant vagrant 4096 jul  7 18:00 .. drwxr-xr-x+   2 vagrant vagrant    6 oct 13  2014 branches -rw-rw-r--+   1 vagrant vagrant  293 may  6 16:45 commit_editmsg -rw-rw-r--+   1 vagrant vagrant  637 jul  8 09:26 config -rw-r--r--+   1 vagrant vagrant   73 oct 13  2014 description -rw-rw-r--+   1 vagrant vagrant 4157 jul  7 17:56 fetch_head -rw-rw-r--+   1 vagrant vagrant    0 jul  7 18:00 head drwxr-xr-x+   2 vagrant vagrant 4096 oct 13  2014 hooks -rw-rw-r--+   1 vagrant vagrant    0 jul  7 18:00 index drwxr-xr-x+   2 vagrant vagrant   20 oct 13  2014 info drwxr-xr-x+   3 vagrant vagrant   28 oct 13  2014 logs drwxr-xr-x+ 259 vagrant vagrant 8192 apr 29 09:31 objects -rw-rw-r--+   1 vagrant vagrant   41 jul  7 17:56 orig_head -rw-r--r--+   1 vagrant vagrant 3442 oct 13  2014 packed-refs drwxrwxr-x+   2 vagrant vagrant 4096 jul  7 18:00 rebase-apply drwxr-xr-x+   5 vagrant vagrant   55 jul  7 16:22 refs 

i have handful of files in git stash i'd keep.

how can recover repo , files?

look in head file, , see if it' pointer e.g. ref: refs/heads/master or sha hash.

if it's pointer in refs/heads/master , see if that's got hash. if has, try running git log on hash see if can recover things. if can, git reset --hard hash should right thing.

you can run git fsck consistency checking on files , perhaps give further indication problem is. should check config file looks sensible (read; isn't corrupted).


Comments

Popular posts from this blog

toolbar - How to add link to user registration inside toobar in admin joomla 3 custom component -

linux - disk space limitation when creating war file -

How to provide Authorization & Authentication using Asp.net, C#? -