以 hello.txt 文件爲例
1.在本地和倉庫把文件都刪除:
rm hello.txt
git rm hello.txt 或者 git add hello.txt
2.在本地把文件刪除了,但是想恢復過來:
git checkout -- hello.txt
以 hello.txt 文件爲例
1.在本地和倉庫把文件都刪除:
rm hello.txt
git rm hello.txt 或者 git add hello.txt
2.在本地把文件刪除了,但是想恢復過來:
git checkout -- hello.txt