首先得到你要回退到的版本号:
git reflog
think@pc-zxn MINGW64 /d/HelpOther/Studentdemos/qianqian-asp/hykj-20180424/hykj ( master)
$ git reflog
3c81828 (HEAD -> master, origin/master) HEAD@{0}: reset: moving to HEAD~1
aeaffda HEAD@{1}: reset: moving to HEAD~1
e01a078 HEAD@{2}: reset: moving to HEAD~1
d9f468a HEAD@{3}: reset: moving to HEAD~1
381ce8a HEAD@{4}: reset: moving to HEAD~1
d8acd17 HEAD@{5}: commit (merge): Merge remote-tracking branch 'origin/master'
381ce8a HEAD@{6}: commit: 1,model配置文件修改
d9f468a HEAD@{7}: reset: moving to HEAD~1
58d1c6d HEAD@{8}: reset: moving to HEAD~2
e96713b HEAD@{9}: reset: moving to HEAD~1
428540e HEAD@{10}: merge origin/master: Fast-forward
e01a078 HEAD@{11}: reset: moving to HEAD
e01a078 HEAD@{12}: reset: moving to HEAD~1
d9f468a HEAD@{13}: reset: moving to d9f468ac3ba939bd19344528c5c1d089bba8336d
58d1c6d HEAD@{14}: reset: moving to HEAD~2
e96713b HEAD@{15}: reset: moving to HEAD~1
428540e HEAD@{16}: reset: moving to HEAD
428540e HEAD@{17}: commit: 1,删除多余文件
e96713b HEAD@{18}: commit (merge): Merge remote-tracking branch 'origin/master'
e9c26d8 HEAD@{19}: reset: moving to HEAD
e9c26d8 HEAD@{20}: commit (amend): 1,appmodel修改名字
9085c15 HEAD@{21}: commit (amend): 1,appmodel修改名字
d172a64 HEAD@{22}: commit: 1,appmodel修改名字
:
3c81828 (HEAD -> master, origin/master) HEAD@{0}: reset: moving to HEAD~1
aeaffda HEAD@{1}: reset: moving to HEAD~1
e01a078 HEAD@{2}: reset: moving to HEAD~1
d9f468a HEAD@{3}: reset: moving to HEAD~1
381ce8a HEAD@{4}: reset: moving to HEAD~1
d8acd17 HEAD@{5}: commit (merge): Merge remote-tracking branch 'origin/master'
381ce8a HEAD@{6}: commit: 1,model配置文件修改
d9f468a HEAD@{7}: reset: moving to HEAD~1
58d1c6d HEAD@{8}: reset: moving to HEAD~2
e96713b HEAD@{9}: reset: moving to HEAD~1
428540e HEAD@{10}: merge origin/master: Fast-forward
e01a078 HEAD@{11}: reset: moving to HEAD
e01a078 HEAD@{12}: reset: moving to HEAD~1
d9f468a HEAD@{13}: reset: moving to d9f468ac3ba939bd19344528c5c1d089bba8336d
58d1c6d HEAD@{14}: reset: moving to HEAD~2
e96713b HEAD@{15}: reset: moving to HEAD~1
428540e HEAD@{16}: reset: moving to HEAD
428540e HEAD@{17}: commit: 1,删除多余文件
e96713b HEAD@{18}: commit (merge): Merge remote-tracking branch 'origin/master'
e9c26d8 HEAD@{19}: reset: moving to HEAD
e9c26d8 HEAD@{20}: commit (amend): 1,appmodel修改名字
9085c15 HEAD@{21}: commit (amend): 1,appmodel修改名字
d172a64 HEAD@{22}: commit: 1,appmodel修改名字
:...skipping...
3c81828 (HEAD -> master, origin/master) HEAD@{0}: reset: moving to HEAD~1
aeaffda HEAD@{1}: reset: moving to HEAD~1
e01a078 HEAD@{2}: reset: moving to HEAD~1
d9f468a HEAD@{3}: reset: moving to HEAD~1
381ce8a HEAD@{4}: reset: moving to HEAD~1
d8acd17 HEAD@{5}: commit (merge): Merge remote-tracking branch 'origin/master'
381ce8a HEAD@{6}: commit: 1,model配置文件修改
d9f468a HEAD@{7}: reset: moving to HEAD~1
58d1c6d HEAD@{8}: reset: moving to HEAD~2
e96713b HEAD@{9}: reset: moving to HEAD~1
428540e HEAD@{10}: merge origin/master: Fast-forward
e01a078 HEAD@{11}: reset: moving to HEAD
e01a078 HEAD@{12}: reset: moving to HEAD~1
d9f468a HEAD@{13}: reset: moving to d9f468ac3ba939bd19344528c5c1d089bba8336d
58d1c6d HEAD@{14}: reset: moving to HEAD~2
e96713b HEAD@{15}: reset: moving to HEAD~1
428540e HEAD@{16}: reset: moving to HEAD
428540e HEAD@{17}: commit: 1,删除多余文件
e96713b HEAD@{18}: commit (merge): Merge remote-tracking branch 'origin/master'
e9c26d8 HEAD@{19}: reset: moving to HEAD
e9c26d8 HEAD@{20}: commit (amend): 1,appmodel修改名字
9085c15 HEAD@{21}: commit (amend): 1,appmodel修改名字
d172a64 HEAD@{22}: commit: 1,appmodel修改名字
58d1c6d HEAD@{23}: commit (amend): 1,签名配置打包
092bd59 HEAD@{24}: commit (amend): 1,签名配置打包
215cdeb HEAD@{25}: commit: 1,签名配置打包
d9f468a HEAD@{26}: commit: 1,签名文件路径配置.
e01a078 HEAD@{27}: commit: 1,签名配置
aeaffda HEAD@{28}: commit: 1,添加地图显示.
找到版本号:
58d1c6d HEAD@{23}: commit (amend): 1,签名配置打包
执行回退,git reset --hard yourCommitNum
git reset --hard 58d1c6d