# 删除远程仓库的末次错误提交

# 加入你只是想修改上次提交的代码,做一次更完美的commit,可以这样

  1. 查看commit id
git log
1
  1. 到上个版本
git reset commitId
1
  1. 暂存修改
git stash
1
  1. 强制push,远程的最新的一次commit被删除
git push --force
1
  1. 释放暂存的修改,开始修改代码
git stash pop
1