github删除一个commit(回滚到某个commit)的方法
2021-05-16 本文已影响0人
招投标秘籍
这次主要是在使用的时候不小心提交了代码,需要删除这次提交,记录一下解决的方法.
1.git reflog找到版本号

2.git reset --hard commit_id

3.git push origin HEAD --force

这次主要是在使用的时候不小心提交了代码,需要删除这次提交,记录一下解决的方法.
1.git reflog找到版本号
2.git reset --hard commit_id