1. 查看所有的歷史版本,獲取你git的某個歷史版本的id, git log
2. 回退本地代碼庫:git reset --hard {commitId},將本地文件回滾:
$ git reset --hard 93330ca1076ac8b60586b55e821b098653a1b442
HEAD is now at 93330ca1076ac8b60586b55e821b098653a1b442add a constellation test case
3. 推送到遠程服務器:git push -f -u origin master 或者直接執行 git push -f
4. 重新拉代碼:git pull