git rm 从版本库中删除该文件
[root@localhost 222]# rm aaa
rm:是否删除普通文件 "aaa"?y
[root@localhost 222]# git checkout aaa (还原删除)
从索引区更新了 1 个路径
[root@localhost 222]# ls
aaa
[root@localhost 222]# rm aaa
rm:是否删除普通文件 "aaa"?y
[root@localhost 222]# git status
位于分支 devd
尚未暂存以备提交的变更:
(使用 "git add/rm <文件>..." 更新要提交的内容)
(使用 "git restore <文件>..." 丢弃工作区的改动)
删除: aaa
修改尚未加入提交(使用 "git add" 和/或 "git commit -a")
[root@localhost 222]# git rm aaa (彻底删除)
rm 'aaa'
[root@localhost 222]# ls
[root@localhost 222]#