• 1
  • 2
  • 3
  • 4
  • 5
  • 6
  • 7
  • 8
  • 9
  • 10
  • 11
  • 12
  • 13
  • 14
  • 15
  • 16
  • 17
  • 18
  • 19
  • 20
  • 21
  • 22
  • 23
  • 24
  • 25
  • 26
  • 27
  • 28
  • 29
  • 30

昨日、今日と二日続けてrepoが壊れたので解決策を探ってみました。コミットはこまめにしておくのが吉だと思います。

   1  $ git status
   2  error: bad signature
   3  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!

   1  $ rm .git/index 
   2  $ git reset

Refs

http://www8.atwiki.jp/git_jp/pub/Documentation.ja/user-manual.html#recovering-from-repository-corruption

おまけ

誰かがバグを修正してコミットしてくれて、自分の手元のrepoが古くなったとき、rebaseすれば最新のをfetchしてきてくれます。

   1  $ git svn rebase

posted by Png satoko on Thu 26 Jun 2008 at 11:20

Comments:

or Preview
Social Bookmarks
  • Delicious
  • B_entry637
  • Clip_16_12_w
Services from s21g
twpro(ツイプロ)
Twitterプロフィールを快適検索
地価2009
土地の値段を調べてみよう
MyRestaurant
自分だけのレストラン手帳
Formula
ブログに数式を埋め込める数式コミュニティ