#author("2020-09-01T07:23:43+09:00","default:ryuichi","ryuichi")
* git addの取消し [#wde3ef9b]

** ここでのgit addの取消しとは? [#za1f5fef]

- '''git add'''してステージしたファイルをINDEXから削除する
- その際、ファイル自体はワーキングディレクトリから削除しない

** 手順 [#y46e46fb]

 > git add 1.txt           # (1)
 > git status
 ## master
 A  1.txt
 
 > git rm --cached 1.txt   # (2)
 rm '1.txt'
 
 > git status              # (3)
 ## master
 ?? 1.txt

- (1) 1.txtをgit addする
- (2) git rm --cachedでそのgit addを取り消す
- (3) INDEXから削除されたが、ファイル自体は存在している


トップ   新規 一覧 検索 最終更新   ヘルプ   最終更新のRSS