以 hello.txt 文件为例
1.在本地和仓库把文件都删除:
rm hello.txt git rm hello.txt 或者 git add hello.txt
2.在本地把文件删除了,但是想恢复过来:
git checkout -- hello.txt