簡體   English   中英

如何顯示Git修訂版本是分支的提示還是不合並?

[英]How to show Git revisions that are either tips of branches or not merges?

我目前使用git log --graph --oneline --decorate --all來查看我項目的歷史記錄。 但是,熟練使用分支導致(非常字面)一半的屏幕被“Merge branch ...”提交。

我嘗試添加--no-merges ,但如果它是分支的一個提示,這也排除了提交,這對於查看我的項目的當前狀態非常重要。 有沒有辦法排除合並提交,除非它們是分支的一角? 我還想在輸出中包含來自其他分支的提交。

你應該使用以下組合(第一個不是強制性的,但建議使用)

git log --first-parent --no-merges

or

git log --max-parents=1

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM