簡體   English   中英

如何只顯示兩個分支的git日志?

[英]How to show git log for only two branches?

我想瀏覽只有特定git分支的git歷史記錄(在bash終端中)。 這種情況是非常常見的用例,因為人們確實希望將其“功能”分支與“主”分支進行比較。

天真,我試過:

git log --oneline --decorate --graph --branches=feature/my_cool_feature

但即使在這種情況下,我也會看到所有其他分支。

有人可以幫助git命令(在bash終端中)只顯示指定分支的git歷史圖嗎?

命令

git show-branch feature master

將顯示僅存在於master或feature中但不同時存在的提交。

我認為這是你正在尋找的命令。

git log --oneline --graph --decorate somebranch otherbranch

暫無
暫無

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

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