git checkout ps.sh
git reset ps.sh
git delete ps.sh
git revert ps.sh
git checkout -- file # 让这个文件回到最近一次git commit或git add时的状态 1.撤销修改(git add/rm 之前) 如果git add 之前修改了文件: git checkout -- file_name 指定文件 或者 git checkout -- . 撤销所有 2.回退至上一个版本 git reset --hard HEAD 回退至指定版本 git reset --hard 版本号
这道题你会答吗?花几分钟告诉大家答案吧!
扫描二维码,关注牛客网
下载牛客APP,随时随地刷题