0
無論我已經看了,它是說,讓之前的承諾,在一個Git倉庫做爲什麼git HEAD〜[N]只能引用pull請求?
git checkout HEAD~1
。但是當我這樣做時,會跳過一些提交。有問題的存儲庫是Google upb library。
編輯:
這些都是在引用庫中的最後10個提交,通過運行
git log --pretty=oneline
ae30b4a816a57a8101ce187245edc3050d515c06 Merge pull request #90 from haberman/gencode3
72c333eb037da6fe63358efe9c6dc29547b0ab49 Fixed amalgamated build.
058a17f6a6c2487fd674511d5409497a03e83758 Fix amalgamated build.
98f513fb8fa5e3360baeb59c37636ca71d562490 Fixed 32-bit build and added generated files.
6b8767422154008eed98d0df42e36758d38877a4 Address review comments and fix compile warnings.
806ffc1d2053f1c02167c7965b39abc997d12ad6 Responded to PR comments.
15308afff2d0d288b73c1b4278bd28f926ce02b8 Fixes for oneof conformance tests.
b697882fb272c2f3408f5c821a88aaf3e3db6f52 Fixed varint length when buffer is reallocated.
be9094d91a2da777002a0f713306ac1bb74a6ac5 New encode/decode: most (171/192) conformance tests pass.
d5167fff744167eca45df65b5b935525778e2886 Merge pull request #88 from google/gencode2
看到自己獲得的。運行git checkout HEAD~1
產生了以下消息
Previous HEAD position was ae30b4a... Merge pull request #90 from haberman/gencode3
HEAD is now at d5167ff... Merge pull request #88 from google/gencode2
所以HEAD
搬回9條,而不是1
運行git log
再次獲得相對於HEAD
提交歷史(在d5167ff
)。
git log --pretty=oneline
d5167fff744167eca45df65b5b935525778e2886 Merge pull request #88 from google/gencode2
6eb489a30ab0bc4e859944650f13db7a706e27da Merge branch 'master' into gencode2
0af928564ef4bb1ad3aa7cef26929bab7836f876 Merge pull request #89 from google/stringview
1278ff899409025692d6915421f1af1c99dc837e Responded to PR comments.
c0a660f474384e0e3c7d4dd75c9b3e6b32daca9f Added upb_stringview, the string representation for upb_msg.
運行git checkout HEAD~1
再次產生
Previous HEAD position was d5167ff... Merge pull request #88 from google/gencode2
HEAD is now at 0af9285... Merge pull request #89 from google/stringview
多次提交已明顯被跳過。
'git HEAD〜1'不是有效的Git命令AFAIK。請_update_你的問題,並告訴我們你到底在做什麼。 –
已更新。你能否在下面提供你的答案。 – UnchartedWaters
就本地而言,據我所知,檢查'HEAD〜1' _必須在'HEAD'(通常是本地分支的頭部)之前立即給予提交,除非您將它移動到其他位置。你能詳細說明哪些提交似乎丟失了嗎? –