修正・削除したファイルを元に戻す修正したファイルを戻すvi 1.txt # (1) git checkout 1.txt 任意のリビジョンに戻すvi 1.txt git checkout abc123 1.txt # (2) git checkout HEAD 1.txt # (3)
削除したファイルを戻すrm 1.txt # (1) git restore 1.txt git rm 1.txt # (2) git restore 1.txt
git addでステージに上げたファイルを戻すvi 1.txt # (1) git add 1.txt git reset 1.txt
|
|