🐧 Linux 総合学習プラットフォーム
取り消し

git restore コマンド

git restore [--staged] FILE

作業ツリーの変更を元に戻したり、ステージから変更を下ろしたりする。

使用例

git restore app.txtファイルの編集を破棄して元に戻す
git restore --staged app.txt変更は残しつつステージから外す

関連する学習トピック

📖 取り消し操作の基本(restore / reset)

同じカテゴリのコマンド

git reset

▶ 学習アプリで「git restore」を練習する