git笔记

查看提交了多少版本

git logs#详细
git log --pretty=oneline#只看到commit id和描述

回退到上一个版本,把head的指针往后移一位

git reset --hard [HEAD^|commit_id]

查看命令历史中的commit_id,以便未来要回到哪个版本

git reflog

猜你喜欢

转载自blog.csdn.net/qq_35772366/article/details/80040862