先查看提交历史
$ git log -3
commit 4fv6534c6565fh5fgh
Author: Mark <xxx@xx.com>
Date: Wed Sep 7 08:08:53 2016 +0800
xxxxxxx
commit fgb899erb56sdf5bdf
Author: xxx<xx@qq.com>
Date: Tue Sep 6 22:18:59 2016 +0800
xxxxxxx
commit fgb8934g35f5sdv5sd
Author: xxx<xxx@qq.com>
Date: Tue Sep 6 14:42:44 2016 +0800
xxxxxxxxxxxxxxxx
回滚到指定的版本
git reset --hard fgb8934g35f5sdv5sd
强制提交覆盖当前版本(我写的master,使用时请自行修改成您要还原的分支名)
git push -f origin master