12
12

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.

GitHub で一旦 merge された Pull Request が revert されたあと一連の commits を適用し直す

Posted at

Big Sky :: 意外と知られていない github 技
http://mattn.kaoriya.net/software/git/20121225171742.htm

↑に書いてある通りだが、

  • Pull Request の内容を patch ファイル形式でダウンロードする(URL の末尾に .patch をつければ ok)
  • git am FILE でコミットを適用しなおす

で ok。

ダウンロードできる patch ファイルはちゃんと各コミットが独立するようになっているのでそのまま適用して ok(PR の diff が丸ごと一コミットにはならない)

$ curl -sL https://patch-diff.githubusercontent.com/raw/kyanny/ghn/pull/36.patch | git am -
12
12
2

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
12
12

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?