1
A
回答
1
Git提交沒有索引編號。一個git倉庫是一個提交樹,它不是一個列表。
git的日誌可以訂購承諾在以下幾個方面:
Commit Ordering
By default, the commits are shown in reverse chronological order.
--topo-order
This option makes them appear in topological order (i.e. descendant commits are shown before their parents).
--date-order
This option is similar to --topo-order in the sense that no parent comes before all of its children, but otherwise things are still ordered in the commit timestamp order.
--reverse
Output the commits in reverse order. Cannot be combined with --walk-reflogs.
如果git的日誌會告訴你的索引號,將每一次改變你展現不同的順序提交(如果你在另一個合併科)。
相關問題
- 1. Git合併細節提交
- 2. git分支提交的數量
- 3. git倉庫提交的數量
- 4. GIT復位提交節目提前/落後改變
- 5. 將Git提交到目錄
- 6. Git提交代數
- 7. Git:確定git pull後拉下的提交數量?
- 8. python的Git提交
- 9. 如何使用標籤以來的提交數量來顯示git提交
- 10. git恢復已提交的提交
- 11. git看提交id的提交日誌
- 12. jQuery的節目警報提交按鈕
- 13. 在項目開始時提交Git
- 14. git-svn提交一個目錄?
- 15. git添加子目錄內容提交
- 16. 作爲提交將增量項目文件夾移動到Git
- 17. 如何獲取小批量提交Git
- 18. 將本地Git提交到git-svn的一個提交中
- 19. 使用git提交一個名爲「.git」的目錄
- 20. 獲取在git中提交的提交數
- 21. 查找所有符合特定「提交次數」的git提交
- 22. 以下git提交提示?
- 23. Git - 顯示上游背後的提交數量
- 24. 如何計算影響給定子樹的git提交數量?
- 25. Git - 刪除提交
- 26. 摺疊git提交
- 27. 恢復git提交
- 28. Git損壞提交
- 29. Git倉庫提交
- 30. Git臨時提交
正如已經給出的答案中所解釋的,Git沒有索引號。如果你解釋你的最終目標,那麼有人可能會提出另一種實現你想要的方式。 –
@MagnusBäck,我想比較我的程序版本號和提交索引號在git –
這不是一個真正的最終目標,並且由於「提交索引號」在Git中不是一個有用的概念,所以您的問題仍然無法解答。如果你想用一些人類可讀的東西來描述一個Git commit,甚至可能涉及到你的版本號[git describe'](https://www.kernel.org/pub/software/scm/git/docs/git -describe.html)可能對您有用。 –