LoginSignup
0
0

More than 3 years have passed since last update.

First Commit前にgit reset する場合の対処

Posted at

概要

初めてのコミット前にgit resetしおうと思ったらできなかったので、その時の対処法をメモします。

方法

失敗した方法

git reset HEAD
fatal: ambiguous argument 'HEAD': unknown revision or path not in the working tree.

普段はこちらでgit add をresetできますが、コミットを一度もしたことない場合できませんでした。

成功した方法

git reset HEAD -- .
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