一、GIT命令:远程仓库强制覆盖本地
1、git fetch --all //获取远程仓库所有代码到本地;
2、git reset --hard origin/master //强制将本地代码和远程仓库同步
3、git pull
二、回滚代码到指定时间的截止版本
1、查看版本号
方法A、使用git log命令 获取版本号,如下图,比如截止到 2022/4/29 18:07:11提交记录
方法B、IDEA中
2、回滚本地仓库,远程仓库未回滚 git reset --hard 版本号
3、git push -f 归滚远程仓库