タグ

2010年5月27日のブックマーク (1件)

  • git revertで複数コミットを巻き戻す方法 - $shibayu36->blog;

    今日git revertを使っていて、少しわかりづらかったのでメモ。実はこのこと昔に書いていたんだよね。http://d.hatena.ne.jp/shiba_yu36/20100221/1266680669 さて、次のコマンドを打つと、単一のコミットを巻き戻す内容のコミットがなされます。このコマンドを打った瞬間にコミットされてしまうので、複数のコミットを巻き戻すコミットを作れません。 git revert (コミット名) しかし、git revertには-nオプションというものがあり、これを使えば複数コミットを巻き戻すコミットを作れます。-nオプションのヘルプを見ると n, --no-commit Usually the command automatically creates a commit with a commit log message stating which commi

    git revertで複数コミットを巻き戻す方法 - $shibayu36->blog;
    lugecy
    lugecy 2010/05/27