發生了一些奇怪的事情 - 我的開發分支已經失去了所有的歷史,直到最後一次提交。任何人都可以提出原因嗎? 我做過的最後一件事 - 安裝了那個分叉brotherbard GitX並開始使用它(主要用於歷史查看,但也嘗試合併)。歷史圖片現在看起來像http://yfrog.com/h2bf8p,但在開發之前從主人開始並行進行,「特徵形狀填充」分支合併爲兩次開發。我也在開發中積累了一些經驗。 現在開發分支的git日誌只顯示最後一次提交。不說任何像'獨立'的東西。我已經害怕GitX(官方和這個分支),因爲上個星期發生了奇怪的事情 - 二進制.fla文件在過去的幾個提交中沒有被保存過。所有的文本文件都很好,但是這個二進制文件就像4次落後。其他工作目錄在分支之間切換時根本沒有更新(我在控制檯工作,git沒有提到任何錯誤,對他來說很好)。不知道,如果它與gitx有關係嗎?Git:分支已經失去了它的歷史?
UPD: 看起來這裏提到http://groups.google.com/group/gitx/browse_thread/thread/71a0f759d115fee5 這裏同樣的問題是我得到的:
$ git reflog
157cfca [email protected]{0}: checkout: moving from feature-shape-fill to develop
46a6163 [email protected]{1}: checkout: moving from develop to feature-shape-fill
157cfca [email protected]{2}: commit: Rotated drag tip
7f6c394 [email protected]{3}: commit: TextShapesCanvas is working,
4765eed [email protected]{4}: merge feature-shape-fill: Merge made by recursive.
ed44a2c [email protected]{5}: checkout: moving from feature-shape-fill to develop
46a6163 [email protected]{6}: commit: More tight packaging (thnx to TextLineMetrics),
59b6d2d [email protected]{7}: checkout: moving from develop to feature-shape-fill
ed44a2c [email protected]{8}: merge feature-shape-fill: Merge made by recursive.
67d08b3 [email protected]{9}: commit: Basic grid functionality, need to add text shapes and fix resize-generation
505479c [email protected]{10}: checkout: moving from feature-shape-fill to develop
59b6d2d [email protected]{11}: commit (amend): Simple retrovirus non-optomized algorithm
5ec1b70 [email protected]{12}: commit: Simple retrovirus non-optomized algorithm
b9eaf18 [email protected]{13}: commit: The most ugly suitable version of fill algorithm
757f1b7 [email protected]{14}: checkout: moving from feature-shape-fill-predefined to feature-shape-fill
757f1b7 [email protected]{15}: checkout: moving from feature-shape-fill to feature-shape-fill-predefined
757f1b7 [email protected]{16}: checkout: moving from feature-shape-fill-auto to feature-shape-fill
b8e284f [email protected]{17}: commit: Auto fill first steps
757f1b7 [email protected]{18}: checkout: moving from feature-shape-fill to feature-shape-fill-auto
757f1b7 [email protected]{19}: commit: Test document created, components::TextShape base draft
505479c [email protected]{20}: checkout: moving from develop to feature-shape-fill
505479c [email protected]{21}: checkout: moving from master to develop
看起來他們不會丟失,但如何讓我的歷史了?
正如我在upd中發現的,我發現,我可以訪問那些丟失的提交,但是如何讓我的分支(作爲提交歷史記錄)回來?你的方式將簡單地創建一個由單一提交組成的開發分支(從主開始),對吧? – 2010-12-18 14:46:49
@Pavel:我猜想所有的提交都放在master的頂部。如果你只是備份你的.git目錄,你可以很快地嘗試上面的命令,看看他們是否能解決你的問題。 – EOL 2010-12-18 18:29:34