Skip to content

Instantly share code, notes, and snippets.

@BichengLUO
Created February 1, 2015 17:10
Show Gist options
  • Save BichengLUO/08557759010e476bc300 to your computer and use it in GitHub Desktop.
Save BichengLUO/08557759010e476bc300 to your computer and use it in GitHub Desktop.
Git强制删除提交到远程版本库的数据与版本记录
git reset --hard HEAD~2 # 取消当前版本之前的两次提交
git push origin HEAD --force # 强制提交到远程版本库,从而删除之前的两次提交数据
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment