Git删除文件

以  hello.txt  文件为例

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

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

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

git checkout -- hello.txt

posted @ 2018-11-25 13:43  HiCYP  阅读(148)  评论(0)    收藏  举报