• 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 Png satoko on Wed 9 Jul 2008 at 15:35

Search Words:

  • git5 reset4 1つ前の状態に1 commit1 head1 svn1 戻る1

Comments:

or Preview
Tags
git
Social Bookmarks
  • Delicious
  • B_entry661
  • Clip_16_12_w661