[英]How can I make a single commit of specific branch from other pushed commits in Git?
[英]how to make “git log commit..commit..” display ONLY commits from given branch
我正在編寫一個“更新”鈎子,以通知問題跟蹤器有關已推送的提交的信息
更新掛鈎獲取參數如下:
“ ref”“ oldrev”“ newrev”(其中oldrev和newrev是提交哈希,而ref是引用名稱,即“ branch”)
非常令人討厭的(並且基本上破壞了整個觀點)是,僅使用“ git log oldrev..newrev”(對於ref / heads中已經存在ref的情況)也枚舉了其他分支中完成的所有提交,如果這些分支合並為“參考”。
我怎樣才能讓git只顯示那些只能從ref訪問的提交?
非常感謝..
如果只想隱藏合並到“ ref” git log --first-parent
可能就足夠了。
另一方面,如果“ ref”不是主要分支,而您試圖在其起點之前略過提交,那似乎是一個未解決的問題
您是否嘗試使用
--no-merges
Do not print commits with more than one parent. This is exactly the same as --max-parents=1.
從git-log的文檔中
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.