Git删除文件

以  hello.txt  文件为例

1.在本地和仓库把文件都删除:

rm hello.txt
git rm hello.txt   或者  git add hello.txt

2.在本地把文件删除了,但是想恢复过来:

git checkout -- hello.txt

原文地址:https://www.cnblogs.com/cypblogs/p/10015436.html