LoginSignup
27
29

More than 5 years have passed since last update.

mergeコミットをrevertする

Posted at

Git flowなんかを使っているとこんな感じのコミット履歴ができあがる

--A--------M
    \     /
     B---C   <- feature/foo  branch

ここでブランチ feature/foo 自体が要らなくなったと場合は次のように revert する

git revert -m 1 M

すると

--A--------M---M'
    \     /
     B---C

となり、コミット M'A は同じ状態になる。

詳しくは revert-a-faulty-merge.txt

27
29
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
27
29