在branch之间checkout,结果发现之前的branch不见了,也没有执行过一些 branch 的delete 操作,这些操作都是UI上操作的。
后来在同事帮助下找回来了,代码,避免一天的活白干了。参考 git reflog
c git reflog
e2b192f HEAD@{0}: pull origin 1.2Dev: Fast-forward
e57e00a HEAD@{1}: checkout: moving from e3e85847d4c48f64ab90bb1e9aac4de81e7e59c7 to 1.2Dev
e3e8584 HEAD@{2}: commit: 修改文件
303e1e1 HEAD@{3}: pull origin 1.2Dev: Merge made by the 'recursive' strategy.
4db2565 HEAD@{4}: commit: 修复merge后的编译错误
095c56b HEAD@{5}: commit (merge): Merge branch '1.2Dev' of git.go.sohuno.com:ios-team/ios-test into HEAD
ff5d886 HEAD@{6}: commit: 增加评论相关的部分文件
325fdbc HEAD@{7}: commit: 增加评论相关的文件
e2a3dd2 HEAD@{8}: commit: 增加评论headview的显示
cadf341 HEAD@{9}: commit: 增加剧集的显示
0a7a159 HEAD@{10}: commit: 增加系列的显示,删除文件
fe5b66e HEAD@{11}: commit: 增加系列的显示
d2551e8 HEAD@{12}: pull --no-commit origin 1.2Dev: Fast-forward
e57e00a HEAD@{13}: checkout: moving from 1.2Dev to remotes/origin/1.2Dev
e57e00a HEAD@{14}: checkout: moving from a176563a71d9b9bc232d3c6227f2b6f04f9456ab to 1.2Dev
a176563 HEAD@{15}: checkout: moving from master to origin/master
a176563 HEAD@{16}: clone: from git@git.go.sohuno.com:ios-team/ios-test.git
$ git log 4db2565
commit 4db2565d976a54daa107501243888e8b36d79e81
Author:
Date: Mon Jun 29 18:59:37 2015 +0800
修复merge后的编译错误
commit 095c56b472a0a1a86555a0e1481f14c2126f4f03
Merge: ff5d886 cb3fe72
Author:
Date: Mon Jun 29 18:57:24 2015 +0800
Merge branch '1.2Dev' of git.go.sohuno.com:ios-team/ios-test into HEAD
Conflicts:
plugins/SHMovie_PayView/SHMovie_Pay.xcodeproj/project.pbxproj
plugins/SHMovie_PayView/SHMovie_Pay/SHVideoVIew/SHMainView/SHMovieVideoViewController+requestData.m
plugins/SHMovie_PayView/SHMovie_Pay/SHVideoVIew/SHMainView/SHMovieVideoViewController.m
commit ff5d8865db7dfe099ee93d7bfa9490d5c328a7e9
Author:
Date: Mon Jun 29 18:51:28 2015 +0800
$ git reset --hard HEAD 4db2565d976a54daa107501243888e8b36d79e81
fatal: Cannot do hard reset with paths.
$ pwd
/Users/weichao/Code/Company/GitSOHU/0626SHVideo/ios-test
$ git reset --hard 4db2565d976a54daa107501243888e8b36d79e81
HEAD is now at 4db2565 修复merge后的编译错误
$