• 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
  • 31

今のコミット間違った―!というときに、コミット内容もなしにして戻すのがgit-reset --hard

git reset --hard HEAD~3
Rewind the master branch to get rid of those three commits.
http://www.kernel.org/pub/software/scm/git/docs/git-reset.html

一つ前のコミットまで戻る時は、**HEAD^**を引数に渡すと戻ってくれます。
あーよかった!

posted by satoko satoko on Wed 9 Jul 2008 at 15:35 with 0 comments