25
26

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 5 years have passed since last update.

cherry-pickでリビジョンの範囲を指定する

Posted at
Terminal
$ git cherry-pick 古い方のリビジョン^..新しい方のリビジョン

Git ver.1.7.2から。


これでテキトーなブランチを作って、テキトーにコミットして、終わったら歴史を整える用のブランチを作って、そこで

Terminal
$ git cherry-pick -n hoge^..moge

とかやったあとにaddcommitで整えられる。

今まではmerge --no-ffでまとめたコミットをcherry-pickしてたのだけど、cherry-pick -m 1が理解できなくて気持ち悪かった。

そもそも歴史を整えるのも良いのかなあとは思いつつ。


25
26
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
25
26

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?