git reflog 找到需要恢复的commit ,记下前面的commit id
git branch temp 312f7d7 新建一个名字叫temp的分支,用这个分支代替之前的临时分支并且拥有想要恢复的commit, 312f7d7为要恢复的commit id
git push origin temp推送到仓库
git checkout master切换到主分支
01-11
476
![](https://csdnimg.cn/release/blogv2/dist/pc/img/readCountWhite.png)
07-01
643
![](https://csdnimg.cn/release/blogv2/dist/pc/img/readCountWhite.png)
06-24
313
![](https://csdnimg.cn/release/blogv2/dist/pc/img/readCountWhite.png)
06-02
307
![](https://csdnimg.cn/release/blogv2/dist/pc/img/readCountWhite.png)
“相关推荐”对你有帮助么?
-
非常没帮助
-
没帮助
-
一般
-
有帮助
-
非常有帮助
提交