0
0

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 1 year has passed since last update.

間違えてpushしてしまってどうにもならない場合

Last updated at Posted at 2023-02-06

間違えてpushしてしまってどうにもならない場合

  1. git logコマンドを打つ
$ git log 

以下のようにcommit id が表示される。

commit 27f0f0abd17eb40bd0aca4d2d3ae46b413a1dXXX (HEAD -> develop, origin/develop)
Author: y.satou <y.satou@gmail.com>
Date:   Mon Dec 12 17:32:14 2022 +0900

    特集
  1. コミットIDを指定して revert する。

上記でいうと「27f0f0abd17eb40bd0aca4d2d3ae46b413a1dXXX 」

$ git revert <commit>

git が 打ち消し用のコミットを作成してくれるのでそれを コミット、pushする。

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

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?