LoginSignup
2
3

More than 5 years have passed since last update.

誤ってコミットしてしまった内容をノーカン(相殺)にするコマンド

Posted at

毎回検索してる気がするので投稿!!

コマンド

git revert 消したいコミットのハッシュ値

gitrevertはコミットを消すわけではなくて指定したコミットに対して取り消すように相殺してくれるコマンド。確認してできるので結構安全。

ログには残ります。

2
3
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
2
3