使用git log命令查看所有的历史版本,获取某个历史版本的id
$ git log
commit f80891105d0d0f567733d860cd3386df7144d8e4
Author: sen.meng <626512443@qq.com>
Date: Sun Nov 5 23:29:56 2017 +0800
up
commit 9e6a52fc34af0cc4498071d37ceb3dc8798b8a20
Author: sen.meng <626512443@qq.com>
Date: Sun Nov 5 23:29:09 2017 +0800
up
假设查到历史版本的id是f80891105d0d0f567733d860cd3386df7144d8e4
git reset --hard f80891105d0d0f567733d860cd3386df7144d8e4
把修改推到远程服务器
git push -f -u origin master