今天不小心提交了敏感信息,要赶紧回退,顺便记录下日志
panzhijie-mac:panzhijie panzhijie$ git log
commit 90c1a61f450a97fc88f7fbb0be73bf863d83e1ae (HEAD -> master, origin/master, origin/HEAD)
Author: panzhijie <684329@qq.com>
Date: Wed Oct 10 19:46:43 2018 +0800
...
panzhijie-mac:panzhijie panzhijie$ git reset --hard 90c1a61f450a97fc88f7fbb0be73bf863d83e1ae
HEAD is now at d83e1ae 备注...
panzhijie-mac:panzhijie panzhijie$ git push origin HEAD -force
error: did you mean `--force` (with two dashes ?)
panzhijie-mac:panzhijie panzhijie$ git push origin HEAD --force
Password for 'https://684329@github.com':
Total 0 (delta 0), reused 0 (delta 0)
To https://github.com/684329/panzhijie.git
+ 90c1a61...d83e1ae HEAD -> master (forced update)
如此,记录便删除成功。