【git】切换commit
2018-10-07 本文已影响0人
印比八方来
项目误改后,想回到上一次的commit。
1.查看commit
git log
显示如下:
commit f755647f756cc4a52e3a4e36c149d86091f6a9fa
Author: apple weinan.di@jimaisong.com
Date: Mon Jan 11 11:29:17 2016 +0800
DWN
commit b300ee580f1f2b92a70d3ff8a373473a8f845463
Author: apple weinan.di@jimaisong.com
Date: Tue Dec 29 17:16:06 2015 +0800
DWN
2.切换commit
#xxx为log的标识
git reset --hard xxx