git小知识-reset、reflog

git使用reset来恢复指定在过去未来版本间跳转,格式如下:
git reset --hard^
可以通过reflog来查询版本号:
git reflog
git reset --hard 版本号
查看版本日志信息
将某个文件恢复到指定版本的步骤:
文件恢复指定版本

发布了40 篇原创文章 · 获赞 1 · 访问量 4519

猜你喜欢

转载自blog.csdn.net/hyt182380/article/details/84314183