LoginSignup
0
0

More than 3 years have passed since last update.

【Git】特定のファイルやディレクトリの変更を取り消したい

Posted at

特定のファイルやディレクトリの変更をなかったことにしたい。
そんなときに使えるコマンド。
メモしておきます。

$ git checkout -- <ファイル名>

これで、特定のファイルの変更を取り消すことができる。

$ git checkout -- <ディレクトリ名>

これは特定のディレクトリの変更を取り消せる。

$ git checkout --.

これで全ての変更を取り消せる。
もしくは、$ git checkout .これだけでも大丈夫。

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