问题描述
git reset HEAD~
执行了这个命令,有办法取消这个操作吗?
问题解答
回答1:git reflog 查看操作历史,找到之前 HEAD 的 hash 值,然后 git reset --hard 到那个 hash 即可。

问题描述
git reset HEAD~
执行了这个命令,有办法取消这个操作吗?
问题解答
回答1:git reflog 查看操作历史,找到之前 HEAD 的 hash 值,然后 git reset --hard 到那个 hash 即可。
相关文章:1. objective-c - 打包证书问题: No matching codesigning identity found:2. objective-c - iOS 动画执行中 退出后台 再进入前台,动画消失了3. objective-c - mrc 和 arc混编报错 。我也写了 foo-objc-arc了。4. objective-c - 编译FFmpeg,’libavformat/avformat.h’ file not found 添加路径无效.5. objective-c - 编译xcode时会卡在compiling 2 of 2 storyboard files。6. objective-c - library not found for -lssl?7. gitlab和github下fork后如何同步源的新更新8. github discard changes 清除了文件的本地修改,如何找回?9. objective-c - iOS 如何获取手机上Mp3音乐文件10. 关于git ls-remote 查看tag,显示「^{}」的问题。

网公网安备:皖ICP备2020019022号-8 Copyright ¢ 2020-2025 Powered by V1.8 All Rights Reserved 技术支持:乐呵呵网
声明:本站所有资源以学习为主