git reflog
来源:互联网 发布:java对list进行排序 编辑:程序博客网 时间:2024/06/06 14:15
Git reflog 可以查看所有分支的所有操作记录(包括(包括commit和reset的操作),包括已经被删除的commit记录,git log则不能察看已经删除了的commit记录
具体一个例子,假设有三个commit, git st:
commit3: add test3.c
commit2: add test2.c
commit1: add test1.c
如果执行git reset --hard HEAD~1则 删除了commit3,如果发现删除错误了,需要恢复commit3,这个时候就要使用git reflog
HEAD@{0}: HEAD~1: updating HEAD
63ee781 HEAD@{1}: commit: test3:q
红色加粗的即是被删除了的 commit3,运行git log则没有这一行记录
可以使用git reset --hard 63ee781将红色记录删除,则恢复了cmmit3,运行git log后可以看到:
commit3: add test3.c
commit2: add test2.c
commit1: add test1.c
这里也可以使用另外一种方法来实现:git cherry-pick 63ee78
0 0
- git reflog
- git reflog
- git reflog
- git#reflog
- git reflog
- git reflog命令
- git reflog用法
- git笔记(reflog)
- Reflog
- Git 学习 -3 log, reflog, reset
- git reflog 恢复删除的commit
- git reflog恢复本地操作/误操作
- git commit/ git rebase /git pull/git reflog
- git撤销大全(reset、reflog、revert、checkout、rebase、rm)
- git——status log reflog diff show
- 如何用git reflog和git cherry-pick找回已删除的commit记录
- git第七讲git组件的绝对名称、引用名称、Tag标签、相对名称和reflog
- git 重置(回退提交版本)and用reflog挽救错误重置
- Spring中@Transactional用法深度分析之一
- http协议9---http协议总结
- 网页特效之弹出窗口控制
- NHK Easy News 翻译 12月22日-3
- Alluxio1.3.0源码编译
- git reflog
- 阿里巴巴的fastjson使用分析
- java集成支付宝支付接口(JSP+支付宝20160912)
- MyBatis(3):SQL映射
- 大小端问题网络字节序
- 0型文法、1型文法、2型文法、3型文法
- 过滤器模式
- 用淘宝接口通过ip查询地域
- COCOA多窗口编程及卷帘式显示