LoginSignup
0
0

More than 3 years have passed since last update.

直前のコミットを取りけし

Last updated at Posted at 2019-08-22

「直前のコミット、アドを取り消していく」
$git reset --soft HEAD^  ←commitは取り消したが、addと保存はそのままの状態。

$git reset HEAD   ←addを取り消した状態。保存はそのままの状態

$git checkout .   ←indexに追加していない変更を取り消し。つまり保存する前の状態に戻す。

これで直前のコミットを消すことができる。

参考
https://qiita.com/shuntaro_tamura/items/db1aef9cf9d78db50ffe

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