git命令杂记

回退一次本地commit,未push到远程服务器的命令

git reset HEAD~1

回滚服务器上的某一个文件

git log <filename>
git reset <log> <filename>

git log templates/order/detail.html.twig 
git reset 4164435463c950888943asd6452hd3abf templates/order/detail.html.twi

git log 作用是打印出提交的日志
git reset作用是回滚
回滚后正常提交

猜你喜欢

转载自blog.csdn.net/qq_38906555/article/details/82776385
今日推荐