26th Thu
gitのRepoが壊れた
昨日、今日と二日続けてrepoが壊れたので解決策を探ってみました。コミットはこまめにしておくのが吉だと思います。
shell>>
$ git status
error: bad signature
fatal: index file corrupt
<<--
git-fsck --fullというコマンドも試してみたのですが、やっぱりだめ。というわけで、ダメもとで下記をやってみたらすんなり復旧できた。yay!
After trying many things, I deleted .git/index and ran git-reset which regenerated the file.
http://www.nishioka.com/blog/2008/01/source-control-with-git-and-cygwin.html
つまり下記でok!
shell>>
$ rm .git/index
$ git reset
<<--
###おまけ
誰かがバグを修正してコミットしてくれて、自分の手元のrepoが古くなったとき、rebaseすれば最新のをfetchしてきてくれます。
shell>>
$ git svn rebase
<<--
posted by
satoko on Thu 26 Jun 2008 at 11:20 with 0 comments