使用两条指令:
git log
git reset --hard <commit_id>
git push origin HEAD --force
其中commit_id是你想回到的commit的id(即想删除的commit的前一个commit),可以在github.com的commit中查看。
操作步骤
1.获取commitID
强制删除github上的提交
再次在GitHub上查询commit,已经没有了
git log
git reset --hard <commit_id>
git push origin HEAD --force
其中commit_id是你想回到的commit的id(即想删除的commit的前一个commit),可以在github.com的commit中查看。
操作步骤
1.获取commitID
强制删除github上的提交
再次在GitHub上查询commit,已经没有了