事故起因
为了保证push到远端时commit是干净的,准备对本地的commit进行合并,此时处于马上要下班的兴奋时刻,手一哆嗦把误点了drop。准备提交的所有commit消失不见
问题处理
- git status
- git reflog –date=iso 查看git的记录找到当时的commit
- git checkout -b tmp a823ba6 ## a823ba6为删除的最后一个commit的id
- git log
- git branch
- git checkout kfapi8-11-19-54
- git branch
- git branch -m kfapi8-11-19-54-back
- git checkout tmp
- git branch -m kfapi8-11-19-54