用于干掉某次不想要的提交操作
1.Administrator@PC-20200406GJJX MINGW64 /d/TIAP_codes/tiap (B#yanglin02)
$ git log
commit 40b043cef509acadfbea95cc9d6c56bb877c71ef (HEAD -> B#yanglin02, origin/B#yanglin02)
Author: yanglin
Date: Fri May 22 10:08:15 2020 +0800
接口管理调试
目的是干掉这次提交
commit 006dad59234b1d2f0906e4b79643c472fafc3bdc
Author: yanglin
Date: Thu May 21 16:42:52 2020 +0800
提交A-pg8接口管理基本属性的资源
commit 0082c750661688e92d4b99104c1497ca0ed00a21 (origin/B#fenglebing)
Author: fenglebing
Date: Thu May 21 15:33:29 2020 +0800
修改fwk标准接口
commit db1dac468e81fdda95abfe8bab9d2bf9c448078c
Merge: 0b439b348 49aebfd69
Author: fenglebing
Date: Thu May 21 14:58:34 2020 +0800
Merge branch 'master' of 172.16.1.86:TIAP/tiap into B#fenglebing
2.先回退到git log 之前的一个版本
$ git reset --soft 0082c750661688e92d4b99104c1497ca0ed00a21
然后再查看状态:
Administrator@PC-20200406GJJX MINGW64 /d/TIAP_codes/tiap (B#yanglin02)
$ git status
哈哈,发现0082c750661688e92d4b99104c1497ca0ed00a21 之后推送的代码都变成modified 了。
3. 正常提交代码
4.执行git push -f 强制更新
Administrator@PC-20200406GJJX MINGW64 /d/TIAP_codes/tiap (B#yanglin02)
$ git push -f