今天不小心把分支的commit提交到master上了。衰

主要通过下面几个命令解决了,很简单记录一下。

git reset –hard  回退到某一个版本
git push origin :xxxx  删除远程分支

 

git reset -soft :取消了commit  
git reset -mixed(默认) :取消了commit ,取消了add
git reset -hard :取消了commit ,取消了add,取消源文件修改

相关文章:

  • 2021-10-04
  • 2022-02-07
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2021-09-22
  • 2021-11-20
猜你喜欢
  • 2021-12-07
  • 2022-12-23
  • 2021-08-08
  • 2021-07-02
  • 2021-10-03
  • 2021-09-04
相关资源
相似解决方案