1. 程式人生 > >git撤銷修改

git撤銷修改

file -s 自己 head git ... 兩種 自己的 reset

git撤銷修改分兩種情況

1.還沒有 git add到stage區 直接命令git checkout -- file 撤銷自己的修改

2.已經git add到stage區 先git reset HEAD <file>..." to unstage 再git checkout -- file撤銷修改

git撤銷修改