1
0

More than 1 year has passed since last update.

git addする前の変更を取り消す

Last updated at Posted at 2022-12-14
  • 変更を加えたものの、元に戻したい場合は下記コマンドを適宜実行して下さい。
    ただし、addもcommitもしていないファイルのみが対象です。
// 特定のファイルの変更を取り消す
git checkout <ファイル名>

// 特定のディレクトリ以下の変更を再帰的に取り消す
git checkout <ディレクトリ名>

// 全てを元に戻す
git checkout .

正常に作動しているかどうかはgit status -sで確認して下さい。

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